Compare commits

..

320 Commits
2.0 ... v2.1.0

Author SHA1 Message Date
Graham Campbell
4d27b189d7 Released 2.1.0 2016-02-06 16:59:15 +00:00
Graham Campbell
221735cd40 Updated dependencies 2016-02-06 16:57:07 +00:00
Graham Campbell
94c768c823 Update VERSION 2016-02-05 14:46:03 +00:00
Graham Campbell
9d31926401 Released 2.1.0-RC2 2016-02-05 14:45:12 +00:00
Graham Campbell
6b875b8218 Merge pull request #1454 from CachetHQ/phpunit
Updated phpunit config
2016-02-05 14:44:05 +00:00
Graham Campbell
6806c018af Updated phpunit config 2016-02-05 14:21:54 +00:00
Graham Campbell
26f6bdeaca Merge pull request #1450 from CachetHQ/incident-presenter-date-factory
Incident presenter date factory
2016-02-05 11:04:00 +00:00
James Brooks
50a7441808 Switch to the DateFactory. Closes #1444 2016-02-05 09:32:42 +00:00
Graham Campbell
ced993af1f Merge pull request #1448 from CachetHQ/update
Updated dependencies
2016-02-04 22:05:55 +00:00
Graham Campbell
3f664ca6f6 Updated dependencies 2016-02-04 21:27:13 +00:00
James Brooks
3f59a11ddc Merge pull request #1447 from CachetHQ/metrics
Fixed bug in the metric repo provider
2016-02-03 09:25:46 +00:00
Graham Campbell
ab2ab5d606 Fixed bug in the metric repo provider 2016-02-02 23:46:42 +00:00
James Brooks
a0e1845658 Merge pull request #1446 from CachetHQ/fix-incident-templates
Twigbridge fixes
2016-02-02 22:29:40 +00:00
James Brooks
69e1bc3948 Fixes #1437, fixes # 2016-02-02 22:08:03 +00:00
Graham Campbell
02816f99c0 Merge pull request #1443 from CachetHQ/stuffs
Working on datetime mess
2016-02-02 22:05:41 +00:00
Graham Campbell
9edba5aacc Minor fixes 2016-02-02 20:49:00 +00:00
Graham Campbell
921116a198 More fixes 2016-02-02 20:46:46 +00:00
Graham Campbell
4923a59b76 Working on datetime mess 2016-02-02 20:35:43 +00:00
Graham Campbell
705b9e62dc Merge pull request #1442 from CachetHQ/bug
Fixed bug in the createNormalized function
2016-02-02 20:35:04 +00:00
Graham Campbell
149ea9a3ff Fixed bug in the createNormalized function 2016-02-02 20:19:55 +00:00
Graham Campbell
87c261a42d Merge pull request #1441 from CachetHQ/remove
Removed old code
2016-02-02 20:18:24 +00:00
Graham Campbell
ff6d26cc59 Removed old code 2016-02-02 20:06:16 +00:00
James Brooks
6c098cc1fa Merge pull request #1438 from CachetHQ/fix-timezone-metrics
Remove converting timezone for fetching
2016-02-02 19:45:05 +00:00
Joseph Cohen
47bba0b927 Remove converting timezone for fetching 2016-02-02 11:15:47 -06:00
James Brooks
7f80b13e2d Merge pull request #1434 from CachetHQ/fix-dashboard-issus
Fix some dashboard issues
2016-02-01 19:38:07 +00:00
James Brooks
3e834f0104 Fix some dashbiard issues 2016-02-01 19:26:00 +00:00
Graham Campbell
2c26bd7396 Merge pull request #1424 from CachetHQ/fixes
Fixes
2016-01-31 17:03:29 +00:00
James Brooks
a1206af764 Initialize the response array 2016-01-31 16:46:30 +00:00
James Brooks
9c4c3d3843 Fix AlreadySubscribedException import 2016-01-31 16:38:15 +00:00
James Brooks
a82f1ce09a Remove unused Config facade 2016-01-31 16:38:08 +00:00
James Brooks
0a6f16a5b9 Update VERSION 2016-01-31 16:37:45 +00:00
James Brooks
deee3b75ff Release v2.1.0-RC1 2016-01-31 16:31:40 +00:00
James Brooks
7c19ab8ca0 Merge pull request #1423 from CachetHQ/update-en-langs
Updated all English language files
2016-01-31 11:31:58 +00:00
James Brooks
66cb4eed97 Fix component change 2016-01-31 11:16:20 +00:00
James Brooks
35c1c603b5 Updated all English language files 2016-01-31 11:04:28 +00:00
Graham Campbell
6ff497f9f5 Merge pull request #1422 from CachetHQ/deps
Updated dependencies
2016-01-30 15:13:47 +00:00
Graham Campbell
d1e22ecc56 Updated dependencies 2016-01-30 15:01:55 +00:00
Graham Campbell
13da2e766d Merge pull request #1421 from CachetHQ/badges
Fixed badges
2016-01-30 14:55:05 +00:00
Graham Campbell
ff4720217a Fixed badges 2016-01-30 12:41:07 +00:00
James Brooks
c678e5e2a6 Merge pull request #1418 from CachetHQ/fix-group-icon-class
Sets the group class toggle class correctly
2016-01-30 12:34:23 +00:00
James Brooks
1d52b18c88 Sets the group class toggle class correctly 2016-01-30 12:21:17 +00:00
James Brooks
2a40965ba0 Merge pull request #1416 from CachetHQ/alt-three-seeder
Seed with a collaped Alt Three group
2016-01-30 12:10:21 +00:00
James Brooks
e8b5a8268f Seed with a collaped Alt Three group 2016-01-30 11:54:30 +00:00
James Brooks
ce6a72c71c Merge pull request #1415 from CachetHQ/update-composers
Update dependencies
2016-01-30 11:46:20 +00:00
James Brooks
d766341bb3 Update dependencies 2016-01-30 11:33:16 +00:00
James Brooks
b18f76c4db Merge pull request #1412 from CachetHQ/fix-typo
Fix a typo
2016-01-30 09:38:18 +00:00
James Brooks
879e176aa9 Fix a typo 2016-01-30 09:01:43 +00:00
James Brooks
63ffe93902 Merge pull request #1294 from CachetHQ/config
Config Improvements
2016-01-30 08:57:05 +00:00
Graham Campbell
b968c38605 Applied fixes from StyleCI 2016-01-29 23:05:36 +00:00
Graham Campbell
6869d6b257 Fixed env writing functions 2016-01-29 23:05:34 +00:00
Graham Campbell
dc8b8eae78 Removed config caching system for now 2016-01-29 23:05:33 +00:00
Graham Campbell
1b24cdb1c5 Improved the config system 2016-01-29 23:05:31 +00:00
Graham Campbell
51e850ddc2 Merge pull request #1408 from CachetHQ/update-bower-asets
Updated all Bower assets
2016-01-29 23:05:11 +00:00
James Brooks
abcb01163d Updated all Bower assets 2016-01-29 22:51:46 +00:00
James Brooks
224d44a50a Merge pull request #1407 from CachetHQ/deps
Updated dependencies
2016-01-29 22:51:24 +00:00
Graham Campbell
c691aa0b47 Updated dependencies 2016-01-29 22:29:06 +00:00
James Brooks
5768640c2b Merge pull request #1406 from CachetHQ/sync-langs
Sync up languages from CrowdIn
2016-01-29 22:24:34 +00:00
James Brooks
8533eeda2f Updated languages contributing docs 2016-01-29 22:08:42 +00:00
James Brooks
3a27d21dc1 Merge pull request #1405 from CachetHQ/analysis-XZlonD
Applied fixes from StyleCI
2016-01-29 22:05:36 +00:00
James Brooks
bdef1b1440 Applied fixes from StyleCI 2016-01-29 17:05:31 -05:00
James Brooks
21fac30350 Sync up languages from CrowdIn. Closes #1259 2016-01-29 22:05:05 +00:00
James Brooks
900475c53c Merge pull request #1352 from CachetHQ/major-outage-system-bar
Show alert for major outages
2016-01-29 21:39:37 +00:00
James Brooks
f19b0d1a46 Show alert for major outages. Closes #1342 2016-01-29 20:49:26 +00:00
James Brooks
54621631e6 Merge pull request #1403 from CachetHQ/report-incident-component-status-test
Added a test for reporting incident with component and status
2016-01-29 17:05:31 +00:00
James Brooks
a32f50fd5e Added a test for reporting incident with component and status 2016-01-29 16:42:04 +00:00
James Brooks
2358f54c3c Merge pull request #1402 from CachetHQ/collapse-component-group-default
Allow component groups to be collapsed by default
2016-01-29 16:37:18 +00:00
James Brooks
da7af1fca0 Allow component groups to be collapsed by default. Closes #1398 2016-01-29 16:02:44 +00:00
James Brooks
d907d1eecc Merge pull request #1401 from CachetHQ/fix-travis-badge
Fixes Travis badge
2016-01-29 16:02:37 +00:00
James Brooks
c80a12f2a3 Fixes Travis badge 2016-01-29 15:46:39 +00:00
James Brooks
117cf27177 Merge pull request #1360 from CachetHQ/component-subscriptions
Per-component subscriptions
2016-01-29 15:39:10 +00:00
James Brooks
ac3888f7c8 Added per-component subscriptions. Closes #734 2016-01-29 15:02:28 +00:00
James Brooks
e5c137f82b Merge pull request #1397 from CachetHQ/update-deps
Updated dependencies
2016-01-25 14:40:27 +00:00
James Brooks
b224c6ab82 Updated dependencies 2016-01-25 14:13:27 +00:00
James Brooks
2b76a61178 Merge pull request #1396 from CachetHQ/site-title-support
Site title shows Cachet is we're showing support. Closes #1394
2016-01-25 14:12:39 +00:00
James Brooks
0466da8fe9 Site title shows Cachet is we're showing support. Closes #1394 2016-01-25 09:52:43 +00:00
James Brooks
bc50e86948 Merge pull request #1395 from CachetHQ/db-port-config
Added db port config to .env - closes #1393
2016-01-25 09:52:02 +00:00
James Brooks
43ac827d5b Added db port config to .env - closes #1393 2016-01-25 09:40:02 +00:00
Graham Campbell
55e20de0a4 Merge pull request #1388 from CachetHQ/update
Updated exceptions package to fix a bug
2016-01-21 14:20:14 +00:00
Graham Campbell
454a4c5548 Updated exceptions package to fix a bug 2016-01-21 13:52:57 +00:00
Graham Campbell
4209e7fac3 Merge pull request #1387 from CachetHQ/exceptions
Upgraded exceptions stuff
2016-01-21 13:17:35 +00:00
Graham Campbell
f19eff244f Upgraded exceptions stuff 2016-01-21 13:06:39 +00:00
Nassim Ait boufrad
61673153d5 Fixed French subscribers translations
Closes #1386
2016-01-21 12:52:55 +00:00
James Brooks
f777f4af6c Merge pull request #1384 from phecho/add-cancel-btn
Added missing cancel btn for dashboard
2016-01-21 08:13:17 +00:00
phecho
714297e786 Added missing cancel btn for dashboard 2016-01-21 14:51:22 +08:00
Graham Campbell
0a3b2c4be9 Merge pull request #1383 from CachetHQ/fix-pgsql-hour-metrics
Fixes Postgres Last Hour Metrics
2016-01-20 10:11:17 +00:00
James Brooks
6d97c2e3ee Fixes #1354 Postgres Last Hour Metrics 2016-01-20 09:26:02 +00:00
James Brooks
ba99e37380 Merge pull request #1382 from CachetHQ/order-metrics
Order metrics by their id. Closes #1355
2016-01-20 08:51:57 +00:00
James Brooks
40cb874969 Order metrics by their id. Closes #1355 2016-01-20 08:40:03 +00:00
James Brooks
aa0b1845e3 Merge pull request #1381 from CachetHQ/prevent-select-timezone-selection
Disable the Select Timezone option
2016-01-19 22:00:11 +00:00
James Brooks
49820acb47 Disable the Select Timezone option 2016-01-19 21:28:32 +00:00
Graham Campbell
b77722f241 Merge pull request #1377 from CachetHQ/update
Updated dependencies
2016-01-18 21:23:00 +00:00
Graham Campbell
5d28a884fb Updated dependencies 2016-01-18 21:09:23 +00:00
James Brooks
b87c6fb835 Merge pull request #1344 from agilmore/incident-template-fix
Ensure incident field names are the same everywhere
2016-01-18 14:47:54 +00:00
agilmore
8cc807cfe5 Fixes #1339 - Ensure incident field names are the same everywhere 2016-01-18 14:31:49 +00:00
James Brooks
5ee7513ed6 Merge pull request #1374 from CachetHQ/deps
Update exceptions package and whoops
2016-01-18 14:25:58 +00:00
James Brooks
47edd1bd55 Run composer 2016-01-18 14:14:03 +00:00
Graham Campbell
1a2d6bac39 Updated dependencies 2016-01-18 10:16:19 +00:00
James Brooks
7f8b1ca787 Merge pull request #1373 from CachetHQ/update-markdown-emoji
Update Emoji and Markdown packages
2016-01-18 09:56:28 +00:00
Graham Campbell
1078bdbb1c Always register the service provider 2016-01-18 09:24:13 +00:00
Graham Campbell
5761baf3f9 Conditionally register the extension 2016-01-18 09:23:44 +00:00
James Brooks
ab2d02edea Update Emoji and Markdown packages 2016-01-18 08:10:46 +00:00
James Brooks
fcebd0a454 Merge pull request #1366 from phecho/fix-settings
Fixes app_analytics_go_squared can't be saved
2016-01-14 08:43:58 +00:00
phecho
e4f1081155 Fixes app_analytics_go_squared can't be saved 2016-01-14 15:58:53 +08:00
Graham Campbell
e48230ee70 Merge pull request #1358 from CachetHQ/jbrooksuk-patch-1
Update ExceptionTransformer.php
2016-01-08 15:43:52 +00:00
James Brooks
54efdf75fe Update ExceptionTransformer.php 2016-01-08 15:09:57 +00:00
Graham Campbell
b928c849e9 Merge pull request #1351 from CachetHQ/twig-config
Publish the Twigbridge config
2016-01-07 15:36:12 +00:00
Graham Campbell
8cf399dd9b Merge pull request #1350 from CachetHQ/upgrade-exceptions-package
Upgrade laravel exceptions to 8.1 - closes #1345
2016-01-07 15:35:58 +00:00
Graham Campbell
b73f00c644 Merge pull request #1353 from CachetHQ/move-bus-exceptions
Moves bus exceptions. Closes #1334
2016-01-07 15:35:52 +00:00
James Brooks
2cf90be995 Publish the Twigbridge config 2016-01-07 15:12:12 +00:00
James Brooks
b4f5df945e Moves bus exceptions. Closes #1334 2016-01-07 15:05:28 +00:00
James Brooks
30f45cd045 Merge pull request #1349 from CachetHQ/remove-id-casting
Laravel auto casts the id column to int for us
2016-01-07 15:00:52 +00:00
James Brooks
cf3ff6164c Update config 2016-01-07 14:56:25 +00:00
James Brooks
cd055cf429 Upgrade laravel exceptions to 8.1 - closes #1345 2016-01-07 14:50:59 +00:00
James Brooks
45c6c37c65 Laravel auto casts the id column to int for us 2016-01-07 14:47:39 +00:00
James Brooks
83d6011345 Merge pull request #1341 from CachetHQ/fix-component-title
Decorate the components
2016-01-05 20:57:09 +00:00
James Brooks
44456fbb7a Decorate the components 2016-01-05 20:30:28 +00:00
Graham Campbell
4c924ad13d Bumped year 2016-01-05 16:11:25 +00:00
Graham Campbell
63afe19f77 Merge pull request #1336 from phecho/fix-typo
Fix typo
2016-01-05 16:02:42 +00:00
Graham Campbell
6e51e259bb Merge pull request #1337 from CachetHQ/update
Updated dependencies
2016-01-05 16:02:16 +00:00
phecho
23ac8071bc Fix typo 2016-01-05 23:51:16 +08:00
Graham Campbell
90ab166ffa Updated dependencies 2016-01-05 15:48:46 +00:00
Graham Campbell
30c1653862 Merge pull request #1333 from CachetHQ/move
Moved things into a bus namespace
2016-01-05 11:05:04 +00:00
Graham Campbell
2c5216aaee Merge pull request #1332 from CachetHQ/analysis-z45178
Applied fixes from StyleCI
2016-01-05 02:38:45 +00:00
Graham Campbell
c117550a8d Applied fixes from StyleCI 2016-01-04 21:38:41 -05:00
Graham Campbell
df5eb24efd Moved things into a bus namespace 2016-01-05 02:38:07 +00:00
Graham Campbell
1d399b27ba Merge pull request #1331 from CachetHQ/tests
Moved provider tests to the correct namespace
2016-01-05 02:33:27 +00:00
Graham Campbell
a1b68bb1a5 Merge pull request #1330 from ZengineChris/patch-1
Add missing csrf field
2016-01-05 02:33:01 +00:00
Graham Campbell
934ccec329 Moved provider tests to the correct namespace 2016-01-05 02:30:37 +00:00
Christian Bartelt
75ee24d154 Add missing csrf field 2016-01-05 01:23:17 +01:00
James Brooks
76ca6c2db9 Merge pull request #1329 from ZengineChris/patch-1
Wrong array key in MetrixController
2016-01-04 22:02:26 +00:00
Christian Bartelt
d099074288 Update MetricController.php
Fixed a wrong key identifier in createMetricAction method.
2016-01-04 22:08:46 +01:00
James Brooks
9c200c9742 Merge pull request #1328 from CachetHQ/fix-analytics-settings
Fixes #1325 - properly save analytics
2016-01-04 20:53:36 +00:00
James Brooks
7bf96cb07f Fixes #1325 - properly save analytics 2016-01-04 20:41:44 +00:00
James Brooks
15419507a3 Merge pull request #1327 from CachetHQ/fix-about-app-dashboard
We need to use the raw value of app_about
2016-01-04 14:12:37 +00:00
James Brooks
0ef759188e We need to use the raw value of app_about 2016-01-04 14:00:57 +00:00
James Brooks
4fbb0ad83a Merge pull request #1323 from CachetHQ/first-query
Call first() on the query itself
2016-01-03 15:29:31 +00:00
James Brooks
fe43a2ad5b Call first() on the query itself 2016-01-03 15:14:22 +00:00
James Brooks
d738b6a9c2 Merge pull request #1322 from CachetHQ/fix-component-group-status-title
Fixes missing titles
2016-01-03 12:59:22 +00:00
James Brooks
5ccd601695 Fixes missing titles 2016-01-03 12:26:27 +00:00
James Brooks
3e15b84867 Merge pull request #1321 from CachetHQ/component-group-lowest-status
Display a status circle next to component groups. Closes #1317
2016-01-03 12:14:01 +00:00
James Brooks
b2b724969b Use the enabled_components relation 2016-01-03 12:03:16 +00:00
James Brooks
1d619cd892 Only pull back lowest if available 2016-01-03 12:02:20 +00:00
James Brooks
cf4cbfa605 Display a status circle next to component groups. Closes #1317 2016-01-03 11:48:53 +00:00
James Brooks
1ec12b7702 Merge pull request #1320 from CachetHQ/update
Updated dependencies
2016-01-03 11:10:06 +00:00
Graham Campbell
e04cd6b3d0 Updated dependencies 2016-01-03 10:58:46 +00:00
Graham Campbell
ecae37d613 Merge pull request #1318 from CachetHQ/update
Updated dependencies
2015-12-31 23:08:38 +00:00
Graham Campbell
315068f77c Updated dependencies 2015-12-31 22:56:20 +00:00
Graham Campbell
a9217379ec Merge pull request #1316 from CachetHQ/update
Updated dependencies
2015-12-30 14:49:06 +00:00
Graham Campbell
05e8e49035 Updated dependencies 2015-12-30 14:43:22 +00:00
Graham Campbell
646638e2cd Bumped the min laravel version 2015-12-30 14:37:59 +00:00
James Brooks
cbdfcaad0d Merge pull request #1314 from cachethq/update-deps
Updated dependencies
2015-12-29 11:02:00 +00:00
James Brooks
2b560309a7 Updated dependencies 2015-12-29 10:48:08 +00:00
James Brooks
240062176d Merge pull request #1310 from cachethq/metrics-default-view
Adds the ability to set the default view in which to display metrics
2015-12-28 14:03:02 +00:00
James Brooks
6e9d5f5e8a Applied fixes from StyleCI 2015-12-28 09:14:50 +00:00
James Brooks
1c27cf7360 Adds the ability to set the default view in which to display metrics 2015-12-28 09:14:50 +00:00
James Brooks
0d406b8360 Merge pull request #1312 from phecho/improve-login
Fixed typo
2015-12-28 09:13:38 +00:00
phecho
617a8da93f Fixed typo 2015-12-27 21:41:18 +08:00
James Brooks
1c1c80c051 Merge pull request #1311 from phecho/fix-annotation
Fixes incorrect annotation
2015-12-26 17:21:05 +00:00
phecho
5ec5054c08 Fixes incorrect annotation 2015-12-27 01:11:16 +08:00
James Brooks
ec2d071a2c Merge pull request #1305 from cachethq/event-tests
Event tests
2015-12-26 10:10:35 +00:00
James Brooks
751859461b Finish event tests 2015-12-26 09:44:32 +00:00
James Brooks
06962c6ded Fix name of InviteWasClaimed event class 2015-12-26 09:42:47 +00:00
James Brooks
0ba49b2a7c Fix class name 2015-12-26 09:33:39 +00:00
James Brooks
a369d4cb08 Merge pull request #1304 from cachethq/analysis-qMKAL8
Applied fixes from StyleCI
2015-12-25 16:10:58 +00:00
James Brooks
073484076b Applied fixes from StyleCI 2015-12-25 11:10:54 -05:00
James Brooks
68d5a5c29e Started working on event tests 2015-12-25 16:10:38 +00:00
James Brooks
f71e9c0cc5 Fix ordering of event listeners 2015-12-25 16:07:28 +00:00
James Brooks
db9a6cd8f8 Register more of the events 2015-12-25 16:05:12 +00:00
James Brooks
eb874ade0f Make all events final classes 2015-12-25 16:04:15 +00:00
James Brooks
af51fe8b99 Merge pull request #1301 from phecho/fix-typo
Improved human_status of ComponentPresenter
2015-12-25 15:42:41 +00:00
phecho
2a8dcb7bf0 Improved human_status of ComponentPresenter 2015-12-25 22:05:29 +08:00
Graham Campbell
c8d0a7dd39 Merge pull request #1291 from reginaldojunior/master
fix word "Localization" in pt-br to "Localização"
2015-12-25 12:04:15 +00:00
Graham Campbell
f5fa14ba7a Merge pull request #1296 from phecho/fix-setup
Improve SetupController
2015-12-25 12:02:35 +00:00
phecho
e5037429e5 Improve SetupController 2015-12-25 19:50:57 +08:00
Graham Campbell
f4cc43fc64 Merge pull request #1299 from phecho/fix-annotation
Added missing annotation
2015-12-25 11:48:10 +00:00
phecho
2905c1339d Added missing annotation 2015-12-25 19:13:28 +08:00
James Brooks
d1152d5d3e Merge pull request #1297 from phecho/improve-user-level
Added const for user level
2015-12-25 10:54:47 +00:00
phecho
2f9cc373ce Added const for user level 2015-12-25 17:52:01 +08:00
Reginaldo Junior
586d42ebde fix translate page of templates incidents 2015-12-24 16:12:21 -02:00
Reginaldo Junior
137dfb2b3c fix word "Localization" in pt-br to "Localização" 2015-12-24 16:05:09 -02:00
Graham Campbell
43fa00ae1d Another cs fix 2015-12-24 17:53:14 +00:00
Graham Campbell
41af00603d Merge pull request #1290 from cachethq/cs
CS fixes
2015-12-24 17:52:05 +00:00
Graham Campbell
9cfb1e1ebe CS fixes 2015-12-24 17:50:20 +00:00
Graham Campbell
b1f94b965f Merge pull request #1288 from cachethq/cleanup
Cleanup middleware and routes
2015-12-24 17:45:18 +00:00
Graham Campbell
aa58312454 Fixed typo 2015-12-24 17:35:18 +00:00
Graham Campbell
a1b7bb8cce Cleanup middleware and routes 2015-12-24 17:30:59 +00:00
Graham Campbell
9957e2ec15 Merge pull request #1285 from cachethq/middleware
Refactor middleware
2015-12-24 16:57:47 +00:00
Graham Campbell
445f5c662a Refactor middleware 2015-12-24 16:52:56 +00:00
Graham Campbell
fa235857b7 Merge pull request #1277 from cachethq/upgrade
Upgrade to Laravel 5.2
2015-12-24 16:40:18 +00:00
Graham Campbell
2441a23871 Updated dependencies 2015-12-24 16:29:55 +00:00
Graham Campbell
cdc107fcb2 Upgrade to laravel 5.2 2015-12-24 16:18:10 +00:00
Graham Campbell
3951f0116a Merge pull request #1284 from cachethq/phpunit
Updated PHPUnit 4.8.19->4.8.21
2015-12-24 16:14:44 +00:00
Graham Campbell
24668b768b Updated composer.lock 2015-12-24 16:09:11 +00:00
Graham Campbell
e4518f7039 Updated phpunit 2015-12-24 16:00:39 +00:00
Graham Campbell
696b0d83c6 Merge pull request #1283 from cachethq/script
Updated scripts
2015-12-24 15:59:56 +00:00
Graham Campbell
dbb71e2ae3 Updated composer.lock hash 2015-12-24 15:56:42 +00:00
Graham Campbell
cfbf1945dd Updated composer scripts 2015-12-24 15:50:28 +00:00
Graham Campbell
3fdf5dc5f7 Merge pull request #1282 from cachethq/dispatcher
Updated deps and use the new dispatch helper
2015-12-24 15:38:15 +00:00
Graham Campbell
34ca408770 Merge pull request #1281 from cachethq/config
Fixed the config service provider
2015-12-24 15:37:57 +00:00
Graham Campbell
7ff9147b30 Updated dependencies 2015-12-24 15:34:45 +00:00
Graham Campbell
00968ceefe Fixed the config service provider 2015-12-24 15:33:36 +00:00
Graham Campbell
c026adb9d6 Bumped min proxy version 2015-12-24 15:28:21 +00:00
Graham Campbell
5557edc342 Use the new dispatch helper function 2015-12-24 15:16:09 +00:00
Graham Campbell
98795c8220 Bumped the minimum laravel vesion 2015-12-24 15:15:14 +00:00
Hereward Mills
22158c3250 Corrected typos in metric point events
Closes #1280
2015-12-24 15:12:32 +00:00
Graham Campbell
65f0ac62fe Merge pull request #1278 from cachethq/metric-hourly
Last hour of metric points
2015-12-24 15:09:55 +00:00
James Brooks
f730729cf4 Merge pull request #1279 from thehereward/correct-returns-void
Replace returns with return void.
2015-12-24 11:48:38 +00:00
James Brooks
3a0c052f8b Last hour of metric points 2015-12-24 11:27:22 +00:00
Hereward Mills
b4173d827a Replace returns with return void. 2015-12-24 10:58:08 +00:00
Graham Campbell
8c80565535 Merge pull request #1276 from cachethq/report-incident-command-validation
Improved validation of component_id field
2015-12-23 16:08:04 +00:00
James Brooks
eabe95a00c Don't make database query in validator 2015-12-23 15:49:08 +00:00
James Brooks
459e79d261 Improved validation of component_id field 2015-12-23 15:48:09 +00:00
Graham Campbell
48ae3eb3e9 Merge pull request #1275 from cachethq/update-dependencies
Updated twigbridge
2015-12-23 15:46:23 +00:00
Graham Campbell
a69509b145 Merge pull request #1274 from cachethq/generate-right-key
Generate a 32 byte key, properly
2015-12-23 15:46:18 +00:00
James Brooks
b5a7919aab Updated twigbridge 2015-12-23 15:43:51 +00:00
James Brooks
632582998f Generate a 32 byte key, properly 2015-12-23 15:41:09 +00:00
Graham Campbell
27f85d941b Merge pull request #1273 from cachethq/setup-middleware
Don't use filters, use middleware. Closes #1269
2015-12-23 15:38:45 +00:00
Graham Campbell
667cb7f155 Merge pull request #1257 from cachethq/settings
Convert raw usage of the session model to the repository
2015-12-23 15:35:18 +00:00
James Brooks
eab75ae831 Don't use filters, use middleware. Closes #1269 2015-12-23 15:28:45 +00:00
Graham Campbell
94ffa5462f Convert raw usage of the session model to the repository 2015-12-23 15:19:09 +00:00
Graham Campbell
4718d07561 Merge pull request #1272 from cachethq/aliases
Cleanup aliases and use binput in the views
2015-12-23 15:17:41 +00:00
Graham Campbell
869ebcfdff Removed bus too to match L5.2 2015-12-23 15:07:31 +00:00
Graham Campbell
61ea28b1aa Use binput in the views 2015-12-23 15:04:27 +00:00
Graham Campbell
9f8db2255b Cleanup aliases 2015-12-23 15:04:15 +00:00
Graham Campbell
cb18362241 Merge pull request #1271 from cachethq/controllers
Minor controller cleanup
2015-12-23 15:00:04 +00:00
Graham Campbell
d4614d8162 Removed unneeded method injection 2015-12-23 14:51:18 +00:00
Graham Campbell
8bf9db6155 Added missing typehint 2015-12-23 14:50:45 +00:00
Graham Campbell
73eb5b000e Merge pull request #1268 from phecho/move-verified_at
Fixes #1267
2015-12-23 14:28:18 +00:00
phecho
ba3d015093 Fixes #1267 2015-12-23 22:09:24 +08:00
Graham Campbell
92bda66c12 Merge pull request #1265 from phecho/improve-human_status
Move HumanStatus to Presenter, see also #1258
2015-12-23 13:50:01 +00:00
phecho
a6f6753fa0 Move HumanStatus to Presenter, see also #1258 2015-12-23 21:35:28 +08:00
Graham Campbell
e64f3bf8c3 Merge pull request #1263 from cachethq/lang
Cleanup language files
2015-12-23 13:30:47 +00:00
Graham Campbell
2951f9a0db Cleanup language files 2015-12-23 13:25:10 +00:00
Graham Campbell
53bc4a559a Merge pull request #1266 from cachethq/travis
Don't run code coverage on pull requests
2015-12-23 13:23:00 +00:00
Graham Campbell
7d57b09371 Don't run code coverage on pull requests 2015-12-23 13:13:49 +00:00
Graham Campbell
9182c61011 Merge pull request #1264 from cachethq/cov
Only generate code coverage on php 5.6
2015-12-23 13:11:35 +00:00
Graham Campbell
a3ecfe8d5f Only generate code coverage on php 5.6 2015-12-23 13:00:32 +00:00
Graham Campbell
0507ff3937 Merge pull request #1260 from cachethq/sync
Pull in changes from Laravel
2015-12-23 12:26:20 +00:00
Graham Campbell
250676ce89 Merge pull request #1258 from phecho/improve-component
Move HumanStatus to Presenter
2015-12-23 12:20:43 +00:00
Graham Campbell
5e3ab3b6ea Pull in changes from Laravel 2015-12-23 12:07:54 +00:00
phecho
8a47dd873f Move HumanStatus to Presenter 2015-12-23 19:44:06 +08:00
Graham Campbell
d5a71976d2 Merge pull request #1254 from phecho/fix-dispatch
Remove dispatchFromArray
2015-12-23 11:22:43 +00:00
phecho
f072f58cb6 Remove dispatchFromArray 2015-12-23 18:23:28 +08:00
James Brooks
a4cd04fd11 Merge pull request #1255 from phecho/finish-trans
Finished off zh-TW translation
2015-12-23 10:19:04 +00:00
phecho
61b01d7c2d Finished off zh-TW translation 2015-12-23 17:58:50 +08:00
Graham Campbell
6a492b68ad Merge pull request #1253 from cachethq/travis
Revert travis build order changes
2015-12-22 21:00:18 +00:00
Graham Campbell
857ec067b9 Revert travis build older changes 2015-12-22 20:42:38 +00:00
Graham Campbell
03b28a0252 Merge pull request #1252 from cachethq/update
Updated dependencies
2015-12-22 20:41:59 +00:00
Graham Campbell
0ae45bfca0 Updated dependencies 2015-12-22 20:13:29 +00:00
Graham Campbell
95caffe82b Merge pull request #1251 from cachethq/return
Added missing return annotation
2015-12-22 20:04:52 +00:00
Graham Campbell
ab370be1c0 Added missing return annotation 2015-12-22 19:47:05 +00:00
Graham Campbell
b1b98f9b55 Merge pull request #1250 from thehereward/fix-some-php-docs
Fix some PHP docs
2015-12-22 19:45:09 +00:00
Hereward Mills
d176cb9b8f Fully qualify class names. 2015-12-22 12:17:21 +00:00
Hereward Mills
a78a5ddb04 Fix some PHP docs. 2015-12-22 08:41:03 +00:00
Joe Cohen
09b4912801 Merge pull request #1242 from phecho/fix-trans
Added missing translation
2015-12-21 22:32:40 -06:00
phecho
e1fa49d1f7 Added missing translation 2015-12-22 08:48:18 +08:00
Graham Campbell
83c4a57acc Merge pull request #1247 from cachethq/fix
Prevent tests breaking due to rolling into the next second
2015-12-22 00:42:56 +00:00
Graham Campbell
78b7582b8d Prevent tests breaking due to rolling into the next second 2015-12-21 22:40:11 +00:00
Graham Campbell
2e48fe919a Merge pull request #1246 from thehereward/fix-spelling-mistakes
Fix some obvious spelling mistakes.
2015-12-21 22:25:46 +00:00
Hereward Mills
ee886cddfd Fix some obvious spelling mistakes. 2015-12-21 22:06:21 +00:00
Graham Campbell
1607275d2d Merge branch '2.0'
# Conflicts:
#	VERSION
#	app/Handlers/Events/Incident/SendIncidentEmailNotificationHandler.php
#	app/Handlers/Events/Incident/SendMaintenanceEmailNotificationHandler.php
#	app/Models/Subscriber.php
2015-12-18 12:55:47 +00:00
James Brooks
0d9ec1c164 Merge pull request #1236 from phecho/develop
Update README for feature #1231
2015-12-17 08:26:20 +00:00
phecho
804d661c31 Update README for feature #1231 2015-12-17 16:13:04 +08:00
Graham Campbell
cfe0cefeb3 Merge branch 'master' of https://github.com/cachethq/Cachet 2015-12-16 18:11:27 +00:00
Graham Campbell
57491b8062 Merge branch '2.0' 2015-12-16 18:11:12 +00:00
James Brooks
3a5405e032 Merge pull request #1231 from phecho/dev-login
User can login with username or email
2015-12-16 18:03:47 +00:00
phecho
c57c9db54a User can login with username or email 2015-12-16 19:15:03 +08:00
Graham Campbell
04af799052 Merge branch '2.0'
# Conflicts:
#	composer.lock
2015-12-15 15:43:37 +00:00
Graham Campbell
9e11f5eba0 Merge pull request #1219 from axilleas/sqlite_gitignore
Add sqlite database to .gitignore
2015-12-12 20:50:43 +00:00
Achilleas Pipinellis
8035ba81f8 Add sqlite database to .gitignore 2015-12-12 22:16:03 +02:00
Graham Campbell
d9a885647b Updated dependencies 2015-12-11 11:47:14 +00:00
Graham Campbell
53889efa8d Updated exceptions package 2015-12-11 11:44:34 +00:00
Graham Campbell
821870f496 Merge branch '2.0'
# Conflicts:
#	composer.lock
2015-12-11 11:43:15 +00:00
Joe Cohen
37598fac3d Merge pull request #1216 from cachethq/unify-is-getters
Unify is clamed on Invite like we do on Subscriber
2015-12-09 19:07:19 -06:00
Joseph Cohen
4c5a12ec89 Unify is clamed on Invite like we do on Subscriber 2015-12-09 18:36:17 -06:00
Joe Cohen
2f526d6cb3 Merge pull request #1214 from cachethq/subcribers-verified-scopes
Added subcriber verified scope and already subscribed msg
2015-12-09 18:33:08 -06:00
Graham Campbell
2fce5f6d6a Merge pull request #1215 from cachethq/analysis-8nPZgq
Applied fixes from StyleCI
2015-12-09 23:38:10 +00:00
Graham Campbell
f1772a2108 Applied fixes from StyleCI 2015-12-09 18:38:06 -05:00
Joseph Cohen
e5c90b25b2 Make subscribers is verified a attribute getter 2015-12-09 17:37:54 -06:00
Joseph Cohen
412c119131 Added subcriber verified scope and already subscribed msg 2015-12-09 15:29:41 -06:00
Graham Campbell
e099b45495 Merge branch '2.0'
# Conflicts:
#	composer.lock
2015-12-09 14:20:18 +00:00
Graham Campbell
945f9cdc78 Merge pull request #1211 from cachethq/move
Moved stuff to foundation
2015-12-07 22:17:14 +00:00
Graham Campbell
be5672c352 Moved stuff to foundation 2015-12-07 22:12:45 +00:00
Graham Campbell
7759f128d2 Merge pull request #1203 from cachethq/exceptions
Exception Improvements
2015-12-07 21:59:10 +00:00
Graham Campbell
c84c49c761 Merge pull request #1199 from cachethq/events
Added Event Interfaces
2015-12-07 21:59:01 +00:00
Graham Campbell
385391bf1f Merge branch '2.0' 2015-12-07 12:05:31 +00:00
Graham Campbell
17ad609424 Merge pull request #1209 from cachethq/revert-1208-master
Revert "Tidy: Remove unused variable."
2015-12-07 12:04:12 +00:00
Graham Campbell
be793a9fd1 Revert "Tidy: Remove unused variable." 2015-12-07 12:04:05 +00:00
Graham Campbell
ffeaed336e Merge branch '2.0' 2015-12-07 11:59:29 +00:00
James Brooks
408e66f793 Merge pull request #1208 from thehereward/master
Tidy: Remove unused variable.
2015-12-07 11:58:03 +00:00
Hereward Mills
8b9adfb9f8 Tidy: Remove unused variable. 2015-12-07 11:25:38 +00:00
Graham Campbell
f5617abd9e Fixed typo 2015-12-06 18:13:30 +00:00
Graham Campbell
991b3e68aa Merge pull request #1204 from cachethq/analysis-XpbMVz
Applied fixes from StyleCI
2015-12-06 18:02:22 +00:00
Graham Campbell
ef220b1c40 Applied fixes from StyleCI 2015-12-06 13:02:14 -05:00
Graham Campbell
e92cb7fb01 Added AlreadySubscribedException
Closes #1201
2015-12-06 18:01:33 +00:00
Graham Campbell
6efe100064 Added new exception interface and updated transformers 2015-12-06 17:59:26 +00:00
Graham Campbell
b9ca5f7066 Updated dependencies 2015-12-06 12:02:12 +00:00
Graham Campbell
66c6460bab Finished off event interfaces 2015-12-06 11:44:02 +00:00
Graham Campbell
c73c5d28a1 Merge pull request #1198 from cachethq/commands
Commands
2015-12-06 11:37:08 +00:00
Graham Campbell
3c1f5cfdf5 Added missing command tests 2015-12-06 11:32:45 +00:00
Graham Campbell
5fd3abcbd0 Fixed commands 2015-12-06 11:32:30 +00:00
Graham Campbell
f3d2b5ba9c Merge pull request #1196 from cachethq/tests
Updated tests
2015-12-06 11:11:45 +00:00
Graham Campbell
bc211f2f55 Merge pull request #1197 from cachethq/analysis-qvDWE8
Applied fixes from StyleCI
2015-12-06 11:11:29 +00:00
Graham Campbell
39422f060f Applied fixes from StyleCI 2015-12-06 06:11:20 -05:00
Graham Campbell
19e3804227 Updated tests 2015-12-06 11:04:02 +00:00
Graham Campbell
036c819922 Merge branch '2.0' 2015-12-06 10:38:49 +00:00
Graham Campbell
8c72cb8fa0 Merge pull request #1193 from phecho/merge-feed-controller
Merge Atom & Rss Controllers into Feed Controller
2015-12-06 10:18:51 +00:00
Graham Campbell
2a0efac1da Merge branch '2.0'
# Conflicts:
#	VERSION
2015-12-02 22:28:29 +00:00
Graham Campbell
30943eb331 Merge branch '2.0' 2015-12-02 22:22:41 +00:00
phecho
6508ebb34a Merged Atom & Rss Controllers into Feed Controller 2015-12-01 16:59:28 +08:00
Joe Cohen
f3fec2c58c Merge pull request #1189 from cachethq/update-system
Update check system
2015-12-01 02:22:11 -06:00
James Brooks
f92b9ff6cb Fix indentation 2015-12-01 07:13:37 +00:00
James Brooks
65566a51df Don't inject the CacheManager 2015-11-30 21:53:03 +00:00
James Brooks
0eee495a38 Don't inject the Release class 2015-11-30 21:49:04 +00:00
Graham Campbell
9d3e36cdab Merge branch '2.0' 2015-11-30 16:03:59 +00:00
Graham Campbell
860407533f Merge branch '2.0' 2015-11-30 11:55:06 +00:00
James Brooks
b5b60fff45 Added update checking, part of #109 2015-11-29 11:00:10 +00:00
James Brooks
e46ee644ae Make alert links readable 2015-11-29 10:53:55 +00:00
Graham Campbell
d8156b0ee3 Updated branch alias 2015-11-28 17:41:30 +00:00
Graham Campbell
4c49f61376 Update VERSION 2015-11-28 17:41:16 +00:00
529 changed files with 22301 additions and 5363 deletions

View File

@@ -8,6 +8,7 @@ DB_HOST=localhost
DB_DATABASE=cachet
DB_USERNAME=homestead
DB_PASSWORD=secret
DB_PORT=null
CACHE_DRIVER=file
SESSION_DRIVER=file

View File

@@ -1,10 +1,10 @@
language: php
php:
- 7.0
- 5.6
- 5.5
- 5.5.9
- 5.5
- 5.6
- 7.0
- hhvm
sudo: false
@@ -13,9 +13,9 @@ install:
- travis_retry composer install --no-interaction --no-scripts --prefer-source
script:
- if [ "$TRAVIS_PHP_VERSION" != "5.5.9" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ] && [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then vendor/bin/phpunit; fi
- if [ "$TRAVIS_PHP_VERSION" == "5.5.9" ] || [ "$TRAVIS_PHP_VERSION" == "5.5" ] || [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
- if [ "$TRAVIS_PHP_VERSION" != "5.6" ] || [ "$TRAVIS_PULL_REQUEST" != false ]; then vendor/bin/phpunit; fi
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ] && [ "$TRAVIS_PULL_REQUEST" == false ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; fi
after_script:
- if [ "$TRAVIS_PHP_VERSION" == "5.5.9" ] || [ "$TRAVIS_PHP_VERSION" == "5.5" ] || [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" == "5.5.9" ] || [ "$TRAVIS_PHP_VERSION" == "5.5" ] || [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ] && [ "$TRAVIS_PULL_REQUEST" == false ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ] && [ "$TRAVIS_PULL_REQUEST" == false ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi

View File

@@ -8,9 +8,7 @@ Feature requests and bug reports should be made by using the [issue tracker](htt
## Languages
When needing to add labels, placeholders or general text, you **must not** write directly into the source file, rather make use of the `./resources/lang/` directory.
Always provide the English translation and copy your English string to all other languages - making sure that the indentation and alignment of the arrays are updated.
Any non-English translations must be made on the [Cachet CrowdIn](https://translate.cachethq.io) project. This makes syncing translations much easier.
## Coding Standards

View File

@@ -1,4 +1,4 @@
Copyright (c) 2015 Alt Three Services Limited.
Copyright (c) 2015-2016 Alt Three Services Limited.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

View File

@@ -1,8 +1,8 @@
# Cachet
[![StyleCI](https://styleci.io/repos/26730195/shield)](https://styleci.io/repos/26730195/)
[![Build Status](https://img.shields.io/travis/cachethq/Cachet.svg?style=flat-square)](https://travis-ci.org/cachethq/Cachet)
[![Quality Score](https://img.shields.io/scrutinizer/g/cachethq/Cachet.svg?style=flat-square)](https://scrutinizer-ci.com/g/cachethq/Cachet)
[![Build Status](https://img.shields.io/travis/CachetHQ/Cachet.svg?style=flat-square)](https://travis-ci.org/CachetHQ/Cachet)
[![Quality Score](https://img.shields.io/scrutinizer/g/CachetHQ/Cachet.svg?style=flat-square)](https://scrutinizer-ci.com/g/CachetHQ/Cachet)
[![Software License](https://img.shields.io/badge/license-BSD3-brightgreen.svg?style=flat-square)](LICENSE)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/cachet/localized.png)](http://translate.cachethq.io/project/cachet)
@@ -50,7 +50,7 @@ You can now find our documentation at [https://docs.cachethq.io](https://docs.ca
To test out the demo, you may login to the [Dashboard](https://demo.cachethq.io/dashboard) with the following:
- **Username:** test@test.com
- **Username:** test or test@test.com
- **Password:** test123
The demo is reset every half hour.

View File

@@ -1 +1 @@
2.0.5-dev
2.1.0

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Component;
namespace CachetHQ\Cachet\Bus\Commands\Component;
final class AddComponentCommand
{

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Component;
namespace CachetHQ\Cachet\Bus\Commands\Component;
use CachetHQ\Cachet\Models\Component;

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Component;
namespace CachetHQ\Cachet\Bus\Commands\Component;
use CachetHQ\Cachet\Models\Component;

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\ComponentGroup;
namespace CachetHQ\Cachet\Bus\Commands\ComponentGroup;
final class AddComponentGroupCommand
{
@@ -27,14 +27,22 @@ final class AddComponentGroupCommand
*/
public $order;
/**
* Is the component group collapsed?
*
* @var bool
*/
public $collapsed;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'required|string',
'order' => 'int',
'name' => 'required|string',
'order' => 'int',
'collapsed' => 'bool',
];
/**
@@ -42,12 +50,14 @@ final class AddComponentGroupCommand
*
* @param string $name
* @param int $order
* @param bool $collapsed
*
* @return void
*/
public function __construct($name, $order)
public function __construct($name, $order, $collapsed)
{
$this->name = $name;
$this->order = (int) $order;
$this->collapsed = $collapsed;
}
}

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\ComponentGroup;
namespace CachetHQ\Cachet\Bus\Commands\ComponentGroup;
use CachetHQ\Cachet\Models\ComponentGroup;

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\ComponentGroup;
namespace CachetHQ\Cachet\Bus\Commands\ComponentGroup;
use CachetHQ\Cachet\Models\ComponentGroup;
@@ -36,14 +36,22 @@ final class UpdateComponentGroupCommand
*/
public $order;
/**
* Is the component group collapsed?
*
* @var bool
*/
public $collapsed;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'string',
'order' => 'int',
'name' => 'string',
'order' => 'int',
'collapsed' => 'bool',
];
/**
@@ -52,13 +60,15 @@ final class UpdateComponentGroupCommand
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
* @param string $name
* @param int $order
* @param bool $collapsed
*
* @return void
*/
public function __construct(ComponentGroup $group, $name, $order)
public function __construct(ComponentGroup $group, $name, $order, $collapsed)
{
$this->group = $group;
$this->name = $name;
$this->order = (int) $order;
$this->collapsed = $collapsed;
}
}

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Incident;
namespace CachetHQ\Cachet\Bus\Commands\Incident;
use CachetHQ\Cachet\Models\Incident;

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Incident;
namespace CachetHQ\Cachet\Bus\Commands\Incident;
final class ReportIncidentCommand
{
@@ -93,7 +93,7 @@ final class ReportIncidentCommand
'status' => 'required|int|min:0|max:4',
'message' => 'string',
'visible' => 'bool',
'component_id' => 'int',
'component_id' => 'int|required_with:component_status',
'component_status' => 'int|min:1|max:4|required_with:component_id',
'notify' => 'bool',
'incident_date' => 'string',
@@ -116,7 +116,7 @@ final class ReportIncidentCommand
*
* @return void
*/
public function __construct($name, $status, $message, $visible, $component_id, $component_status, $notify, $incident_date, $template, $template_vars)
public function __construct($name, $status, $message, $visible, $component_id, $component_status, $notify, $incident_date, $template, array $template_vars = null)
{
$this->name = $name;
$this->status = $status;

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Incident;
namespace CachetHQ\Cachet\Bus\Commands\Incident;
final class ReportMaintenanceCommand
{

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Incident;
namespace CachetHQ\Cachet\Bus\Commands\Incident;
use CachetHQ\Cachet\Models\Incident;
@@ -111,7 +111,7 @@ final class UpdateIncidentCommand
/**
* Create a new update incident command instance.
*
* @param \CachetHQ\Cachet\Models\Incident $name
* @param \CachetHQ\Cachet\Models\Incident $incident
* @param string $name
* @param int $status
* @param string $message
@@ -125,7 +125,7 @@ final class UpdateIncidentCommand
*
* @return void
*/
public function __construct(Incident $incident, $name, $status, $message, $visible, $component_id, $component_status, $notify, $incident_date, $template, $template_vars)
public function __construct(Incident $incident, $name, $status, $message, $visible, $component_id, $component_status, $notify, $incident_date, $template, array $template_vars = null)
{
$this->incident = $incident;
$this->name = $name;

View File

@@ -9,25 +9,27 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Invite;
namespace CachetHQ\Cachet\Bus\Commands\Invite;
use CachetHQ\Cachet\Models\Invite;
final class ClaimInviteCommand
{
/**
* The invte to mark as claimed.
* The invite to mark as claimed.
*
* @var \CachetHQ\Cachet\Model\Invite
* @var \CachetHQ\Cachet\Models\Invite
*/
public $invite;
/**
* Create a new claim invite command instance.
*
* @param \CachetHQ\Cachet\Model\Invite $invite
* @param \CachetHQ\Cachet\Models\Invite $invite
*
* @return void
*/
public function __construct($invite)
public function __construct(Invite $invite)
{
$this->invite = $invite;
}

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Commands\Metric;
final class AddMetricCommand
{
@@ -62,6 +62,13 @@ final class AddMetricCommand
*/
public $places;
/**
* The view to show the metric points in.
*
* @var int
*/
public $default_view;
/**
* The validation rules.
*
@@ -76,6 +83,7 @@ final class AddMetricCommand
'calc_type' => 'int',
'display_chart' => 'int',
'places' => 'int|between:0,4',
'default_view' => 'int|between:0,3',
];
/**
@@ -88,10 +96,11 @@ final class AddMetricCommand
* @param int $calc_type
* @param int $display_chart
* @param int $places
* @param int $default_view
*
* @return void
*/
public function __construct($name, $suffix, $description, $default_value, $calc_type, $display_chart, $places)
public function __construct($name, $suffix, $description, $default_value, $calc_type, $display_chart, $places, $default_view)
{
$this->name = $name;
$this->suffix = $suffix;
@@ -100,5 +109,6 @@ final class AddMetricCommand
$this->calc_type = $calc_type;
$this->display_chart = $display_chart;
$this->places = $places;
$this->default_view = $default_view;
}
}

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\MetricPoint;

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
@@ -71,6 +71,13 @@ final class UpdateMetricCommand
*/
public $places;
/**
* The view to show the metric points in.
*
* @var int
*/
public $default_view;
/**
* The validation rules.
*
@@ -84,7 +91,8 @@ final class UpdateMetricCommand
'default_value' => 'numeric',
'calc_type' => 'int|in:0,1',
'display_chart' => 'int',
'places' => 'numeric|min:0|max:4',
'places' => 'numeric|between:0,4',
'default_view' => 'numeric|between:0,4',
];
/**
@@ -98,10 +106,11 @@ final class UpdateMetricCommand
* @param int $calc_type
* @param int $display_chart
* @param int $places
* @param int $default_view
*
* @return void
*/
public function __construct(Metric $metric, $name, $suffix, $description, $default_value, $calc_type, $display_chart, $places)
public function __construct(Metric $metric, $name, $suffix, $description, $default_value, $calc_type, $display_chart, $places, $default_view)
{
$this->metric = $metric;
$this->name = $name;
@@ -111,5 +120,6 @@ final class UpdateMetricCommand
$this->calc_type = $calc_type;
$this->display_chart = $display_chart;
$this->places = $places;
$this->default_view = $default_view;
}
}

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
use CachetHQ\Cachet\Models\MetricPoint;

View File

@@ -9,8 +9,13 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Subscriber;
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
/**
* This is the subscribe subscriber command.
*
* @author James Brooks <james@alt-three.com>
*/
final class SubscribeSubscriberCommand
{
/**
@@ -27,6 +32,13 @@ final class SubscribeSubscriberCommand
*/
public $verified;
/**
* The subscriptions that we want to add.
*
* @var array|null
*/
public $subscriptions;
/**
* The validation rules.
*
@@ -39,14 +51,16 @@ final class SubscribeSubscriberCommand
/**
* Create a new subscribe subscriber command instance.
*
* @param string $email
* @param bool $verified
* @param string $email
* @param bool $verified
* @param null|array $subscriptions
*
* @return void
*/
public function __construct($email, $verified = false)
public function __construct($email, $verified = false, $subscriptions = null)
{
$this->email = $email;
$this->verified = $verified;
$this->subscriptions = $subscriptions;
}
}

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Subscriber;
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
@@ -25,7 +25,7 @@ final class UnsubscribeSubscriberCommand
/**
* Create a unsubscribe subscriber command instance.
*
* @param string $subscriber
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/

View File

@@ -0,0 +1,36 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
use CachetHQ\Cachet\Models\Subscription;
final class UnsubscribeSubscriptionCommand
{
/**
* The subscription to unsubscribe.
*
* @var \CachetHQ\Cachet\Models\Subscription
*/
public $subscription;
/**
* Create a unsubscribe subscription command instance.
*
* @param \CachetHQ\Cachet\Models\Subscription $subscription
*
* @return void
*/
public function __construct(Subscription $subscription)
{
$this->subscription = $subscription;
}
}

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\Subscriber;
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
@@ -25,7 +25,7 @@ final class VerifySubscriberCommand
/**
* Create a verify subscriber command instance.
*
* @param string $subscriber
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\User;
namespace CachetHQ\Cachet\Bus\Commands\User;
final class AddTeamMemberCommand
{

View File

@@ -9,7 +9,9 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\User;
namespace CachetHQ\Cachet\Bus\Commands\User;
use CachetHQ\Cachet\Models\User;
final class GenerateApiTokenCommand
{
@@ -27,7 +29,7 @@ final class GenerateApiTokenCommand
*
* @return void
*/
public function __construct($user)
public function __construct(User $user)
{
$this->user = $user;
}

View File

@@ -9,12 +9,12 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\User;
namespace CachetHQ\Cachet\Bus\Commands\User;
final class InviteTeamMemberCommand
{
/**
* The invte emails.
* The invite emails.
*
* @var string[]
*/
@@ -32,11 +32,11 @@ final class InviteTeamMemberCommand
/**
* Create a new invite team member command instance.
*
* @param array $email
* @param string[] $emails
*
* @return void
*/
public function __construct($emails)
public function __construct(array $emails)
{
$this->emails = $emails;
}

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\User;
namespace CachetHQ\Cachet\Bus\Commands\User;
use CachetHQ\Cachet\Models\User;

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Commands\User;
namespace CachetHQ\Cachet\Bus\Commands\User;
final class SignupUserCommand
{

View File

@@ -0,0 +1,19 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Component;
use CachetHQ\Cachet\Bus\Events\EventInterface;
interface ComponentEventInterface extends EventInterface
{
//
}

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Component;
namespace CachetHQ\Cachet\Bus\Events\Component;
use CachetHQ\Cachet\Models\Component;
class ComponentWasAddedEvent
final class ComponentWasAddedEvent implements ComponentEventInterface
{
/**
* The component that was added.
@@ -25,6 +25,8 @@ class ComponentWasAddedEvent
/**
* Create a new component was added event instance.
*
* @param \CachetHQ\Cachet\Models\Component $component
*
* @return void
*/
public function __construct(Component $component)

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Component;
namespace CachetHQ\Cachet\Bus\Events\Component;
use CachetHQ\Cachet\Models\Component;
class ComponentWasRemovedEvent
final class ComponentWasRemovedEvent implements ComponentEventInterface
{
/**
* The component that was removed.
@@ -25,6 +25,8 @@ class ComponentWasRemovedEvent
/**
* Create a new component was removed event instance.
*
* @param \CachetHQ\Cachet\Models\Component $component
*
* @return void
*/
public function __construct(Component $component)

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Component;
namespace CachetHQ\Cachet\Bus\Events\Component;
use CachetHQ\Cachet\Models\Component;
class ComponentWasUpdatedEvent
final class ComponentWasUpdatedEvent implements ComponentEventInterface
{
/**
* The component that was updated.
@@ -25,6 +25,8 @@ class ComponentWasUpdatedEvent
/**
* Create a new component was updated event instance.
*
* @param \CachetHQ\Cachet\Models\Component $component
*
* @return void
*/
public function __construct(Component $component)

View File

@@ -0,0 +1,19 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
use CachetHQ\Cachet\Bus\Events\EventInterface;
interface ComponentGroupEventInterface extends EventInterface
{
//
}

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\ComponentGroup;
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
use CachetHQ\Cachet\Models\ComponentGroup;
class ComponentGroupWasAddedEvent
final class ComponentGroupWasAddedEvent implements ComponentGroupEventInterface
{
/**
* The component group that was added.
@@ -25,6 +25,8 @@ class ComponentGroupWasAddedEvent
/**
* Create a new component group was added event instance.
*
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
*
* @return void
*/
public function __construct(ComponentGroup $group)

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\ComponentGroup;
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
use CachetHQ\Cachet\Models\ComponentGroup;
class ComponentGroupWasRemovedEvent
final class ComponentGroupWasRemovedEvent implements ComponentGroupEventInterface
{
/**
* The component group that was removed.
@@ -25,6 +25,8 @@ class ComponentGroupWasRemovedEvent
/**
* Create a new component group was removed event instance.
*
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
*
* @return void
*/
public function __construct(ComponentGroup $group)

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\ComponentGroup;
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
use CachetHQ\Cachet\Models\ComponentGroup;
class ComponentGroupWasUpdatedEvent
final class ComponentGroupWasUpdatedEvent implements ComponentGroupEventInterface
{
/**
* The component group that was updated.
@@ -25,6 +25,8 @@ class ComponentGroupWasUpdatedEvent
/**
* Create a new component group was updated event instance.
*
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
*
* @return void
*/
public function __construct(ComponentGroup $group)

View File

@@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\User;
namespace CachetHQ\Cachet\Bus\Events;
interface UserEventInterface
interface EventInterface
{
//
}

View File

@@ -0,0 +1,19 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Incident;
use CachetHQ\Cachet\Bus\Events\EventInterface;
interface IncidentEventInterface extends EventInterface
{
//
}

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Incident;
namespace CachetHQ\Cachet\Bus\Events\Incident;
use CachetHQ\Cachet\Models\Incident;
class IncidentWasRemovedEvent
final class IncidentWasRemovedEvent implements IncidentEventInterface
{
/**
* The incident that has been removed.
@@ -24,6 +24,10 @@ class IncidentWasRemovedEvent
/**
* Create a new incident was removed event instance.
*
* @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return void
*/
public function __construct(Incident $incident)
{

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Incident;
namespace CachetHQ\Cachet\Bus\Events\Incident;
use CachetHQ\Cachet\Models\Incident;
class IncidentWasReportedEvent
final class IncidentWasReportedEvent implements IncidentEventInterface
{
/**
* The incident that has been reported.
@@ -25,6 +25,8 @@ class IncidentWasReportedEvent
/**
* Create a new incident has reported event instance.
*
* @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return void
*/
public function __construct(Incident $incident)

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Incident;
namespace CachetHQ\Cachet\Bus\Events\Incident;
use CachetHQ\Cachet\Models\Incident;
class IncidentWasUpdatedEvent
final class IncidentWasUpdatedEvent implements IncidentEventInterface
{
/**
* The incident that has been updated.
@@ -25,6 +25,8 @@ class IncidentWasUpdatedEvent
/**
* Create a new incident has updated event instance.
*
* @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return void
*/
public function __construct(Incident $incident)

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Incident;
namespace CachetHQ\Cachet\Bus\Events\Incident;
use CachetHQ\Cachet\Models\Incident;
class MaintenanceWasScheduledEvent
final class MaintenanceWasScheduledEvent implements IncidentEventInterface
{
/**
* The incident that has been reported.
@@ -25,6 +25,8 @@ class MaintenanceWasScheduledEvent
/**
* Create a new maintenance has scheduled event instance.
*
* @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return void
*/
public function __construct(Incident $incident)

View File

@@ -0,0 +1,19 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Invite;
use CachetHQ\Cachet\Bus\Events\EventInterface;
interface InviteEventInterface extends EventInterface
{
//
}

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Invite;
namespace CachetHQ\Cachet\Bus\Events\Invite;
use CachetHQ\Cachet\Models\Invite;
final class InviteWasClaimed
final class InviteWasClaimedEvent implements InviteEventInterface
{
/**
* The invite that has been claimed.

View File

@@ -0,0 +1,19 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Bus\Events\EventInterface;
interface MetricEventInterface extends EventInterface
{
//
}

View File

@@ -9,26 +9,28 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Metric;
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Models\MetricPoint;
class MetricPointWasAddedEvent
final class MetricPointWasAddedEvent implements MetricEventInterface
{
/**
* The metric point that was added.
*
* @var \CachetHQ\Cachet\Models\MetricPoint
*/
public $metric;
public $metricPoint;
/**
* Create a new metric point was added event instance.
*
* @param \CachetHQ\Cachet\Models\MetricPoint $metricPoint
*
* @return void
*/
public function __construct(MetricPoint $metric)
public function __construct(MetricPoint $metricPoint)
{
$this->metric = $metric;
$this->metricPoint = $metricPoint;
}
}

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Metric;
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Models\MetricPoint;
class MetricPointWasRemovedEvent
final class MetricPointWasRemovedEvent implements MetricEventInterface
{
/**
* The metric point that was removed.
@@ -25,6 +25,8 @@ class MetricPointWasRemovedEvent
/**
* Create a new metric point was removed event instance.
*
* @param \CachetHQ\Cachet\Models\MetricPoint $memtricPoint
*
* @return void
*/
public function __construct(MetricPoint $metricPoint)

View File

@@ -9,26 +9,28 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Metric;
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Models\MetricPoint;
class MetricPointWasUpdatedEvent
final class MetricPointWasUpdatedEvent implements MetricEventInterface
{
/**
* The metric point that was updated.
*
* @var \CachetHQ\Cachet\Models\MetricPoint
*/
public $point;
public $metricPoint;
/**
* Create a new metric point was updated event instance.
*
* @param \CachetHQ\Cachet\Models\MetricPoint $metricPoint
*
* @return void
*/
public function __construct(MetricPoint $point)
public function __construct(MetricPoint $metricPoint)
{
$this->point = $point;
$this->metricPoint = $metricPoint;
}
}

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Metric;
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Models\Metric;
class MetricWasAddedEvent
final class MetricWasAddedEvent implements MetricEventInterface
{
/**
* The metric that was added.
@@ -25,6 +25,8 @@ class MetricWasAddedEvent
/**
* Create a new metric was added event instance.
*
* @param \CachetHQ\Cachet\Models\Metric $metric
*
* @return void
*/
public function __construct(Metric $metric)

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Metric;
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Models\Metric;
class MetricWasRemovedEvent
final class MetricWasRemovedEvent implements MetricEventInterface
{
/**
* The metric that was removed.
@@ -25,6 +25,8 @@ class MetricWasRemovedEvent
/**
* Create a new metric was removed event instance.
*
* @param \CachetHQ\Cachet\Models\Metric $metric
*
* @return void
*/
public function __construct(Metric $metric)

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Metric;
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Models\Metric;
class MetricWasUpdatedEvent
final class MetricWasUpdatedEvent implements MetricEventInterface
{
/**
* The metric that was updated.
@@ -25,6 +25,8 @@ class MetricWasUpdatedEvent
/**
* Create a new metric was updated event instance.
*
* @param \CachetHQ\Cachet\Models\Metric $metric
*
* @return void
*/
public function __construct(Metric $metric)

View File

@@ -0,0 +1,19 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
use CachetHQ\Cachet\Bus\Events\EventInterface;
interface SubscriberEventInterface extends EventInterface
{
//
}

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Subscriber;
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
class SubscriberHasSubscribedEvent
final class SubscriberHasSubscribedEvent implements SubscriberEventInterface
{
/**
* The subscriber who has subscribed.
@@ -25,6 +25,8 @@ class SubscriberHasSubscribedEvent
/**
* Create a new subscriber has subscribed event instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/
public function __construct(Subscriber $subscriber)

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Subscriber;
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
class SubscriberHasUnsubscribedEvent
final class SubscriberHasUnsubscribedEvent implements SubscriberEventInterface
{
/**
* The subscriber who has unsubscribed.
@@ -25,6 +25,8 @@ class SubscriberHasUnsubscribedEvent
/**
* Create a new subscriber has unsubscribed event instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/
public function __construct(Subscriber $subscriber)

View File

@@ -0,0 +1,41 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
/**
* This is the subscriber has updated subscriptions event.
*
* @author James Brooks <james@alt-three.com>
*/
final class SubscriberHasUpdatedSubscriptionsEvent implements SubscriberEventInterface
{
/**
* The subscriber.
*
* @var \CachetHQ\Cachet\Models\Subscriber
*/
public $subscriber;
/**
* Create a new subscriber has updated subscriptions event instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/
public function __construct(Subscriber $subscriber)
{
$this->subscriber = $subscriber;
}
}

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\Subscriber;
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
class SubscriberHasVerifiedEvent
final class SubscriberHasVerifiedEvent implements SubscriberEventInterface
{
/**
* The subscriber who has verified.
@@ -25,6 +25,8 @@ class SubscriberHasVerifiedEvent
/**
* Create a new subscriber has subscribed event instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/
public function __construct(Subscriber $subscriber)

View File

@@ -0,0 +1,19 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\EventInterface;
interface UserEventInterface extends EventInterface
{
//
}

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\User;
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Models\User;
@@ -25,6 +25,8 @@ final class UserWasAddedEvent implements UserEventInterface
/**
* Create a new user was added event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\User;
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Models\Invite;
final class UserWasInvitedEvent
final class UserWasInvitedEvent implements UserEventInterface
{
/**
* The invite that has been added.
@@ -25,6 +25,8 @@ final class UserWasInvitedEvent
/**
* Create a new user was invite event instance.
*
* @param \CachetHQ\Cachet\Models\Invite $invite
*
* @return void
*/
public function __construct(Invite $invite)

View File

@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Events\User;
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Models\User;
@@ -25,6 +25,8 @@ final class UserWasRemovedEvent implements UserEventInterface
/**
* Create a new user was removed event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)

View File

@@ -0,0 +1,23 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Exceptions;
/**
* This is the exception interface.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
interface ExceptionInterface
{
//
}

View File

@@ -0,0 +1,26 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Exceptions\Subscriber;
use CachetHQ\Cachet\Bus\Exceptions\ExceptionInterface;
use Exception;
/**
* This is the already subscribed exception class.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
class AlreadySubscribedException extends Exception implements ExceptionInterface
{
//
}

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Component;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Component;
use CachetHQ\Cachet\Commands\Component\AddComponentCommand;
use CachetHQ\Cachet\Events\Component\ComponentWasAddedEvent;
use CachetHQ\Cachet\Bus\Commands\Component\AddComponentCommand;
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasAddedEvent;
use CachetHQ\Cachet\Models\Component;
class AddComponentCommandHandler
@@ -20,7 +20,7 @@ class AddComponentCommandHandler
/**
* Handle the add component command.
*
* @param \CachetHQ\Cachet\Commands\Component\AddComponentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Component\AddComponentCommand $command
*
* @return \CachetHQ\Cachet\Models\Component
*/
@@ -36,7 +36,7 @@ class AddComponentCommandHandler
/**
* Filter the command data.
*
* @param \CachetHQ\Cachet\Commands\Incident\AddComponentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Incident\AddComponentCommand $command
*
* @return array
*/

View File

@@ -9,17 +9,17 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Component;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Component;
use CachetHQ\Cachet\Commands\Component\RemoveComponentCommand;
use CachetHQ\Cachet\Events\Component\ComponentWasRemovedEvent;
use CachetHQ\Cachet\Bus\Commands\Component\RemoveComponentCommand;
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasRemovedEvent;
class RemoveComponentCommandHandler
{
/**
* Handle the remove component command.
*
* @param \CachetHQ\Cachet\Commands\Component\RemoveComponentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Component\RemoveComponentCommand $command
*
* @return void
*/

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Component;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Component;
use CachetHQ\Cachet\Commands\Component\UpdateComponentCommand;
use CachetHQ\Cachet\Events\Component\ComponentWasUpdatedEvent;
use CachetHQ\Cachet\Bus\Commands\Component\UpdateComponentCommand;
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasUpdatedEvent;
use CachetHQ\Cachet\Models\Component;
class UpdateComponentCommandHandler
@@ -20,7 +20,7 @@ class UpdateComponentCommandHandler
/**
* Handle the update component command.
*
* @param \CachetHQ\Cachet\Commands\Component\UpdateComponentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Component\UpdateComponentCommand $command
*
* @return \CachetHQ\Cachet\Models\Component
*/
@@ -38,7 +38,7 @@ class UpdateComponentCommandHandler
/**
* Filter the command data.
*
* @param \CachetHQ\Cachet\Commands\Incident\UpdateComponentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Incident\UpdateComponentCommand $command
*
* @return array
*/

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\ComponentGroup;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\ComponentGroup;
use CachetHQ\Cachet\Commands\ComponentGroup\AddComponentGroupCommand;
use CachetHQ\Cachet\Events\ComponentGroup\ComponentGroupWasAddedEvent;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\AddComponentGroupCommand;
use CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasAddedEvent;
use CachetHQ\Cachet\Models\ComponentGroup;
class AddComponentGroupCommandHandler
@@ -20,15 +20,16 @@ class AddComponentGroupCommandHandler
/**
* Handle the add component group command.
*
* @param \CachetHQ\Cachet\Commands\ComponentGroup\AddComponentGroupCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\AddComponentGroupCommand $command
*
* @return \CachetHQ\Cachet\Models\ComponentGroup
*/
public function handle(AddComponentGroupCommand $command)
{
$group = ComponentGroup::create([
'name' => $command->name,
'order' => $command->order,
'name' => $command->name,
'order' => $command->order,
'collapsed' => $command->collapsed,
]);
event(new ComponentGroupWasAddedEvent($group));

View File

@@ -9,17 +9,17 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\ComponentGroup;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\ComponentGroup;
use CachetHQ\Cachet\Commands\ComponentGroup\RemoveComponentGroupCommand;
use CachetHQ\Cachet\Events\ComponentGroup\ComponentGroupWasRemovedEvent;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\RemoveComponentGroupCommand;
use CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasRemovedEvent;
class RemoveComponentGroupCommandHandler
{
/**
* Handle the remove component group command.
*
* @param \CachetHQ\Cachet\Commands\ComponentGroup\RemoveComponentGroupCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\RemoveComponentGroupCommand $command
*
* @return void
*/

View File

@@ -0,0 +1,55 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Handlers\Commands\ComponentGroup;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\UpdateComponentGroupCommand;
use CachetHQ\Cachet\Bus\Events\ComponentGroup\ComponentGroupWasUpdatedEvent;
class UpdateComponentGroupCommandHandler
{
/**
* Handle the update component group command.
*
* @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\UpdateComponentGroupCommand $command
*
* @return \CachetHQ\Cachet\Models\ComponentGroup
*/
public function handle(UpdateComponentGroupCommand $command)
{
$group = $command->group;
$group->update($this->filter($command));
event(new ComponentGroupWasUpdatedEvent($group));
return $group;
}
/**
* Filter the command data.
*
* @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\UpdateComponentGroupCommand $command
*
* @return array
*/
protected function filter(UpdateComponentGroupCommand $command)
{
$params = [
'name' => $command->name,
'order' => $command->order,
'collapsed' => $command->collapsed,
];
return array_filter($params, function ($val) {
return $val !== null;
});
}
}

View File

@@ -9,17 +9,17 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Incident;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Incident;
use CachetHQ\Cachet\Commands\Incident\RemoveIncidentCommand;
use CachetHQ\Cachet\Events\Incident\IncidentWasRemovedEvent;
use CachetHQ\Cachet\Bus\Commands\Incident\RemoveIncidentCommand;
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasRemovedEvent;
class RemoveIncidentCommandHandler
{
/**
* Handle the remove incident command.
*
* @param \CachetHQ\Cachet\Commands\Incident\RemoveIncidentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Incident\RemoveIncidentCommand $command
*
* @return void
*/

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Incident;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Incident;
use CachetHQ\Cachet\Commands\Incident\ReportIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\ReportIncidentCommand;
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent;
use CachetHQ\Cachet\Dates\DateFactory;
use CachetHQ\Cachet\Events\Incident\IncidentWasReportedEvent;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\IncidentTemplate;
@@ -44,23 +44,24 @@ class ReportIncidentCommandHandler
/**
* Handle the report incident command.
*
* @param \CachetHQ\Cachet\Commands\Incident\ReportIncidentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Incident\ReportIncidentCommand $command
*
* @return \CachetHQ\Cachet\Models\Incident
*/
public function handle(ReportIncidentCommand $command)
{
if ($command->template) {
$command->message = $this->parseIncidentTemplate($command->template, $command->template_vars);
}
$data = [
'name' => $command->name,
'status' => $command->status,
'message' => $command->message,
'visible' => $command->visible,
];
if ($command->template) {
$data['message'] = $this->parseIncidentTemplate($command->template, $command->template_vars);
} else {
$data['message'] = $command->message;
}
// Link with the component.
if ($command->component_id) {
$data['component_id'] = $command->component_id;
@@ -101,6 +102,10 @@ class ReportIncidentCommandHandler
*/
protected function parseIncidentTemplate($templateSlug, $vars)
{
if ($vars === null) {
$vars = [];
}
Twig::setLoader(new Twig_Loader_String());
$template = IncidentTemplate::forSlug($templateSlug)->first();

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Incident;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Incident;
use CachetHQ\Cachet\Commands\Incident\ReportMaintenanceCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\ReportMaintenanceCommand;
use CachetHQ\Cachet\Bus\Events\Incident\MaintenanceWasScheduledEvent;
use CachetHQ\Cachet\Dates\DateFactory;
use CachetHQ\Cachet\Events\Incident\MaintenanceWasScheduledEvent;
use CachetHQ\Cachet\Models\Incident;
class ReportMaintenanceCommandHandler
@@ -26,7 +26,7 @@ class ReportMaintenanceCommandHandler
protected $dates;
/**
* Create a new report maintanance command handler instance.
* Create a new report maintenance command handler instance.
*
* @param \CachetHQ\Cachet\Dates\DateFactory $dates
*
@@ -40,7 +40,7 @@ class ReportMaintenanceCommandHandler
/**
* Handle the report maintenance command.
*
* @param \CachetHQ\Cachet\Commands\Incident\ReportMaintenanceCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Incident\ReportMaintenanceCommand $command
*
* @return \CachetHQ\Cachet\Models\Incident
*/

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Incident;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Incident;
use CachetHQ\Cachet\Commands\Incident\UpdateIncidentCommand;
use CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand;
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasUpdatedEvent;
use CachetHQ\Cachet\Dates\DateFactory;
use CachetHQ\Cachet\Events\Incident\IncidentWasUpdatedEvent;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\IncidentTemplate;
@@ -44,7 +44,7 @@ class UpdateIncidentCommandHandler
/**
* Handle the update incident command.
*
* @param \CachetHQ\Cachet\Commands\Incident\UpdateIncidentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand $command
*
* @return \CachetHQ\Cachet\Models\Incident
*/
@@ -82,7 +82,7 @@ class UpdateIncidentCommandHandler
/**
* Filter the command data.
*
* @param \CachetHQ\Cachet\Commands\Incident\UpdateIncidentCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Incident\UpdateIncidentCommand $command
*
* @return array
*/

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Invite;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Invite;
use CachetHQ\Cachet\Commands\Invite\ClaimInviteCommand;
use CachetHQ\Cachet\Events\Invite\InviteWasClaimed;
use CachetHQ\Cachet\Bus\Commands\Invite\ClaimInviteCommand;
use CachetHQ\Cachet\Bus\Events\Invite\InviteWasClaimed;
use Carbon\Carbon;
class ClaimInviteCommandHandler
@@ -20,7 +20,7 @@ class ClaimInviteCommandHandler
/**
* Handle the claim invite command.
*
* @param \CachetHQ\Cachet\Commands\User\ClaimInviteCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\User\ClaimInviteCommand $command
*
* @return void
*/

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
use CachetHQ\Cachet\Commands\Metric\AddMetricCommand;
use CachetHQ\Cachet\Events\Metric\MetricWasAddedEvent;
use CachetHQ\Cachet\Bus\Commands\Metric\AddMetricCommand;
use CachetHQ\Cachet\Bus\Events\Metric\MetricWasAddedEvent;
use CachetHQ\Cachet\Models\Metric;
class AddMetricCommandHandler
@@ -20,7 +20,7 @@ class AddMetricCommandHandler
/**
* Handle the add metric command.
*
* @param \CachetHQ\Cachet\Commands\Metric\AddMetricCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Metric\AddMetricCommand $command
*
* @return \CachetHQ\Cachet\Models\Metric
*/
@@ -34,6 +34,7 @@ class AddMetricCommandHandler
'calc_type' => $command->calc_type,
'display_chart' => $command->display_chart,
'places' => $command->places,
'default_view' => $command->default_view,
]);
event(new MetricWasAddedEvent($metric));

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
use CachetHQ\Cachet\Commands\Metric\AddMetricPointCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\AddMetricPointCommand;
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasAddedEvent;
use CachetHQ\Cachet\Dates\DateFactory;
use CachetHQ\Cachet\Events\Metric\MetricPointWasAddedEvent;
use CachetHQ\Cachet\Models\MetricPoint;
class AddMetricPointCommandHandler
@@ -40,7 +40,7 @@ class AddMetricPointCommandHandler
/**
* Handle the add metric point command.
*
* @param \CachetHQ\Cachet\Commands\Metric\AddMetricPointCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Metric\AddMetricPointCommand $command
*
* @return \CachetHQ\Cachet\Models\MetricPoint
*/

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
use CachetHQ\Cachet\Commands\Metric\RemoveMetricCommand;
use CachetHQ\Cachet\Events\Metric\MetricWasRemovedEvent;
use CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricCommand;
use CachetHQ\Cachet\Bus\Events\Metric\MetricWasRemovedEvent;
use CachetHQ\Cachet\Models\Metric;
class RemoveMetricCommandHandler
@@ -20,7 +20,7 @@ class RemoveMetricCommandHandler
/**
* Handle the remove metric command.
*
* @param \CachetHQ\Cachet\Commands\Metric\RemoveMetricCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricCommand $command
*
* @return void
*/

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
use CachetHQ\Cachet\Commands\Metric\RemoveMetricPointCommand;
use CachetHQ\Cachet\Events\Metric\MetricPointWasRemovedEvent;
use CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricPointCommand;
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasRemovedEvent;
use CachetHQ\Cachet\Models\Metric;
class RemoveMetricPointCommandHandler
@@ -20,7 +20,7 @@ class RemoveMetricPointCommandHandler
/**
* Handle the remove metric point command.
*
* @param \CachetHQ\Cachet\Commands\Metric\RemoveMetricPointCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Metric\RemoveMetricPointCommand $command
*
* @return void
*/

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
use CachetHQ\Cachet\Commands\Metric\UpdateMetricCommand;
use CachetHQ\Cachet\Events\Metric\MetricWasUpdatedEvent;
use CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricCommand;
use CachetHQ\Cachet\Bus\Events\Metric\MetricWasUpdatedEvent;
use CachetHQ\Cachet\Models\Metric;
class UpdateMetricCommandHandler
@@ -20,7 +20,7 @@ class UpdateMetricCommandHandler
/**
* Handle the update metric command.
*
* @param \CachetHQ\Cachet\Commands\Metric\UpdateMetricCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricCommand $command
*
* @return \CachetHQ\Cachet\Models\Metric
*/
@@ -38,7 +38,7 @@ class UpdateMetricCommandHandler
/**
* Filter the command data.
*
* @param \CachetHQ\Cachet\Commands\Metric\UpdateMetricCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricCommand $command
*
* @return array
*/
@@ -52,6 +52,7 @@ class UpdateMetricCommandHandler
'calc_type' => $command->calc_type,
'display_chart' => $command->display_chart,
'places' => $command->places,
'default_view' => $command->default_view,
];
return array_filter($params, function ($val) {

View File

@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Metric;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Metric;
use CachetHQ\Cachet\Commands\Metric\UpdateMetricPointCommand;
use CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricPointCommand;
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasUpdatedEvent;
use CachetHQ\Cachet\Dates\DateFactory;
use CachetHQ\Cachet\Events\Metric\MetricPointWasUpdatedEvent;
class UpdateMetricPointCommandHandler
{
@@ -39,7 +39,7 @@ class UpdateMetricPointCommandHandler
/**
* Handle the update metric point command.
*
* @param \CachetHQ\Cachet\Commands\Metric\UpdateMetricPointCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Metric\UpdateMetricPointCommand $command
*
* @return \CachetHQ\Cachet\Models\MetricPoint
*/

View File

@@ -0,0 +1,67 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Subscriber;
use CachetHQ\Cachet\Bus\Commands\Subscriber\SubscribeSubscriberCommand;
use CachetHQ\Cachet\Bus\Commands\Subscriber\VerifySubscriberCommand;
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasSubscribedEvent;
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasUpdatedSubscriptionsEvent;
use CachetHQ\Cachet\Bus\Exceptions\Subscriber\AlreadySubscribedException;
use CachetHQ\Cachet\Models\Subscriber;
use CachetHQ\Cachet\Models\Subscription;
/**
* This is the subscribe subscriber command handler.
*
* @author James Brooks <james@alt-three.com>
*/
class SubscribeSubscriberCommandHandler
{
/**
* Handle the subscribe subscriber command.
*
* @param \CachetHQ\Cachet\Bus\Commands\Subscriber\SubscribeSubscriberCommand $command
*
* @throws \CachetHQ\Cachet\Exceptions\AlreadySubscribedException
*
* @return \CachetHQ\Cachet\Models\Subscriber
*/
public function handle(SubscribeSubscriberCommand $command)
{
if (Subscriber::where('email', $command->email)->first() && $command->subscriptions === null) {
throw new AlreadySubscribedException("Cannot subscribe {$command->email} because they're already subscribed.");
}
$subscriber = Subscriber::firstOrCreate(['email' => $command->email]);
if ($subscriptions = $command->subscriptions) {
foreach ($subscriptions as $subscription => $subscriptionValue) {
Subscription::firstOrCreate([
'subscriber_id' => $subscriber->id,
$subscription => $subscriptionValue,
]);
}
}
if ($subscriber->is_verified === false) {
if ($command->verified) {
dispatch(new VerifySubscriberCommand($subscriber));
} else {
event(new SubscriberHasSubscribedEvent($subscriber));
}
} else {
event(new SubscriberHasUpdatedSubscriptionsEvent($subscriber));
}
return $subscriber;
}
}

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Subscriber;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Subscriber;
use CachetHQ\Cachet\Commands\Subscriber\UnsubscribeSubscriberCommand;
use CachetHQ\Cachet\Events\Subscriber\SubscriberHasUnsubscribedEvent;
use CachetHQ\Cachet\Bus\Commands\Subscriber\UnsubscribeSubscriberCommand;
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasUnsubscribedEvent;
use CachetHQ\Cachet\Models\Subscriber;
class UnsubscribeSubscriberCommandHandler
@@ -20,7 +20,7 @@ class UnsubscribeSubscriberCommandHandler
/**
* Handle the subscribe customer command.
*
* @param \CachetHQ\Cachet\Commands\Subscriber\UnsubscribeSubscriberCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Subscriber\UnsubscribeSubscriberCommand $command
*
* @return void
*/

View File

@@ -0,0 +1,35 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Subscriber;
use CachetHQ\Cachet\Bus\Commands\Subscriber\UnsubscribeSubscriptionCommand;
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasUnsubscribedEvent;
use CachetHQ\Cachet\Models\Subscription;
class UnsubscribeSubscriptionCommandHandler
{
/**
* Handle the unsubscribe subscription command.
*
* @param \CachetHQ\Cachet\Bus\Commands\Subscriber\UnsubscribeSubscriptionCommand $command
*
* @return void
*/
public function handle(UnsubscribeSubscriptionCommand $command)
{
$subscription = $command->subscription;
event(new SubscriberHasUnsubscribedEvent($subscription->subscriber));
$subscription->delete();
}
}

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\Subscriber;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\Subscriber;
use CachetHQ\Cachet\Commands\Subscriber\VerifySubscriberCommand;
use CachetHQ\Cachet\Events\Subscriber\SubscriberHasVerifiedEvent;
use CachetHQ\Cachet\Bus\Commands\Subscriber\VerifySubscriberCommand;
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasVerifiedEvent;
use CachetHQ\Cachet\Models\Subscriber;
use Carbon\Carbon;
@@ -21,7 +21,7 @@ class VerifySubscriberCommandHandler
/**
* Handle the subscribe customer command.
*
* @param \CachetHQ\Cachet\Commands\Subscriber\VerifySubscriberCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\Subscriber\VerifySubscriberCommand $command
*
* @return void
*/
@@ -29,6 +29,7 @@ class VerifySubscriberCommandHandler
{
$subscriber = $command->subscriber;
// Mark the subscriber as verified.
$subscriber->verified_at = Carbon::now();
$subscriber->save();

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\User;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
use CachetHQ\Cachet\Commands\User\AddTeamMemberCommand;
use CachetHQ\Cachet\Events\User\UserWasAddedEvent;
use CachetHQ\Cachet\Bus\Commands\User\AddTeamMemberCommand;
use CachetHQ\Cachet\Bus\Events\User\UserWasAddedEvent;
use CachetHQ\Cachet\Models\User;
class AddTeamMemberCommandHandler
@@ -20,7 +20,7 @@ class AddTeamMemberCommandHandler
/**
* Handle the add team member command.
*
* @param \CachetHQ\Cachet\Commands\User\AddTeamMemberCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\User\AddTeamMemberCommand $command
*
* @return \CachetHQ\Cachet\Models\User
*/

View File

@@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\User;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
use CachetHQ\Cachet\Commands\User\GenerateApiTokenCommand;
use CachetHQ\Cachet\Bus\Commands\User\GenerateApiTokenCommand;
use CachetHQ\Cachet\Models\User;
class GenerateApiTokenCommandHandler
@@ -19,7 +19,7 @@ class GenerateApiTokenCommandHandler
/**
* Handle the generate api key command.
*
* @param \CachetHQ\Cachet\Commands\User\GenerateApiTokenCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\User\GenerateApiTokenCommand $command
*
* @return void
*/

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\User;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
use CachetHQ\Cachet\Commands\User\InviteTeamMemberCommand;
use CachetHQ\Cachet\Events\User\UserWasInvitedEvent;
use CachetHQ\Cachet\Bus\Commands\User\InviteTeamMemberCommand;
use CachetHQ\Cachet\Bus\Events\User\UserWasInvitedEvent;
use CachetHQ\Cachet\Models\Invite;
class InviteTeamMemberCommandHandler
@@ -20,7 +20,7 @@ class InviteTeamMemberCommandHandler
/**
* Handle the invite team member command.
*
* @param \CachetHQ\Cachet\Commands\User\InviteTeamMemberCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\User\InviteTeamMemberCommand $command
*
* @return void
*/

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\User;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
use CachetHQ\Cachet\Commands\User\RemoveUserCommand;
use CachetHQ\Cachet\Events\User\UserWasRemovedEvent;
use CachetHQ\Cachet\Bus\Commands\User\RemoveUserCommand;
use CachetHQ\Cachet\Bus\Events\User\UserWasRemovedEvent;
use CachetHQ\Cachet\Models\User;
class RemoveUserCommandHandler
@@ -20,7 +20,7 @@ class RemoveUserCommandHandler
/**
* Handle the remove user command.
*
* @param \CachetHQ\Cachet\Commands\User\RemoveUserCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\User\RemoveUserCommand $command
*
* @return void
*/

View File

@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Commands\User;
namespace CachetHQ\Cachet\Bus\Handlers\Commands\User;
use CachetHQ\Cachet\Commands\User\SignupUserCommand;
use CachetHQ\Cachet\Events\User\UserWasAddedEvent;
use CachetHQ\Cachet\Bus\Commands\User\SignupUserCommand;
use CachetHQ\Cachet\Bus\Events\User\UserWasAddedEvent;
use CachetHQ\Cachet\Models\User;
class SignupUserCommandHandler
@@ -20,7 +20,7 @@ class SignupUserCommandHandler
/**
* Handle the signup user command.
*
* @param \CachetHQ\Cachet\Commands\User\SignupUserCommand $command
* @param \CachetHQ\Cachet\Bus\Commands\User\SignupUserCommand $command
*
* @return \CachetHQ\Cachet\Models\User
*/
@@ -30,7 +30,7 @@ class SignupUserCommandHandler
'username' => $command->username,
'password' => $command->password,
'email' => $command->email,
'level' => 2,
'level' => User::LEVEL_USER,
]);
event(new UserWasAddedEvent($user));

View File

@@ -0,0 +1,72 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Handlers\Events\Component;
use CachetHQ\Cachet\Bus\Events\Component\ComponentWasUpdatedEvent;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\Subscription;
use Illuminate\Contracts\Mail\MailQueue;
use Illuminate\Mail\Message;
use McCool\LaravelAutoPresenter\Facades\AutoPresenter;
class SendComponentUpdateEmailNotificationHandler
{
/**
* The mailer instance.
*
* @var \Illuminate\Contracts\Mail\Mailer
*/
protected $mailer;
/**
* Create a new send incident email notification handler.
*
* @param \Illuminate\Contracts\Mail\Mailer $mailer
*
* @return void
*/
public function __construct(MailQueue $mailer)
{
$this->mailer = $mailer;
}
/**
* Handle the event.
*
* @param \CachetHQ\Cachet\Bus\Events\Component\ComponentWasUpdatedEvent $event
*
* @return void
*/
public function handle(ComponentWasUpdatedEvent $event)
{
$component = AutoPresenter::decorate($event->component);
$mail = [
'subject' => trans('cachet.subscriber.email.component.subject'),
'component_name' => $component->name,
'component_human_status' => $component->human_status,
];
foreach (Subscription::isVerifiedForComponent($component->id)->with('subscriber')->get() as $subscription) {
$subscriber = $subscription->subscriber;
$mail['email'] = $subscriber->email;
$mail['unsubscribe_link'] = route('subscribe.unsubscribe', ['code' => $subscriber->verify_code, 'subscription' => $subscription->id]);
$this->mailer->queue([
'html' => 'emails.components.update-html',
'text' => 'emails.components.update-text',
], $mail, function (Message $message) use ($mail) {
$message->to($mail['email'])->subject($mail['subject']);
});
}
}
}

View File

@@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Events\Incident;
namespace CachetHQ\Cachet\Bus\Handlers\Events\Incident;
use CachetHQ\Cachet\Events\Incident\IncidentWasReportedEvent;
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent;
use CachetHQ\Cachet\Models\Subscriber;
use Illuminate\Contracts\Mail\MailQueue;
use Illuminate\Mail\Message;
@@ -50,7 +50,7 @@ class SendIncidentEmailNotificationHandler
/**
* Handle the event.
*
* @param \CachetHQ\Cachet\Events\Incident\IncidentHasReportedEvent $event
* @param \CachetHQ\Cachet\Bus\Events\Incident\IncidentHasReportedEvent $event
*
* @return void
*/
@@ -71,7 +71,7 @@ class SendIncidentEmailNotificationHandler
'subject' => 'New incident reported.',
'has_component' => ($event->incident->component) ? true : false,
'component_name' => $component ? $component->name : null,
'status' => $incident->humanStatus,
'status' => $incident->human_status,
'html_content' => $incident->formattedMessage,
'text_content' => $incident->message,
'token' => $subscriber->token,

View File

@@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Events\Incident;
namespace CachetHQ\Cachet\Bus\Handlers\Events\Incident;
use CachetHQ\Cachet\Events\Incident\MaintenanceWasScheduledEvent;
use CachetHQ\Cachet\Bus\Events\Incident\MaintenanceWasScheduledEvent;
use CachetHQ\Cachet\Models\Subscriber;
use Illuminate\Contracts\Mail\MailQueue;
use Illuminate\Mail\Message;
@@ -50,7 +50,7 @@ class SendMaintenanceEmailNotificationHandler
/**
* Handle the event.
*
* @param \CachetHQ\Cachet\Events\MaintenanceHasScheduledEvent $event
* @param \CachetHQ\Cachet\Bus\Events\MaintenanceHasScheduledEvent $event
*
* @return void
*/
@@ -66,7 +66,7 @@ class SendMaintenanceEmailNotificationHandler
$mail = [
'email' => $subscriber->email,
'subject' => 'Scheduled maintenance.',
'status' => $data->humanStatus,
'status' => $data->human_status,
'html_content' => $data->formattedMessage,
'text_content' => $data->message,
'scheduled_at' => $data->scheduled_at_formatted,

View File

@@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Events\Subscriber;
namespace CachetHQ\Cachet\Bus\Handlers\Events\Subscriber;
use CachetHQ\Cachet\Events\Subscriber\SubscriberHasSubscribedEvent;
use CachetHQ\Cachet\Bus\Events\Subscriber\SubscriberHasSubscribedEvent;
use Illuminate\Contracts\Mail\MailQueue;
use Illuminate\Mail\Message;
@@ -39,7 +39,7 @@ class SendSubscriberVerificationEmailHandler
/**
* Handle the event.
*
* @param \CachetHQ\Cachet\Events\SubscriberHasSubscribedEvent $event
* @param \CachetHQ\Cachet\Bus\Events\SubscriberHasSubscribedEvent $event
*
* @return void
*/

View File

@@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Handlers\Events\User;
namespace CachetHQ\Cachet\Bus\Handlers\Events\User;
use CachetHQ\Cachet\Events\User\UserWasInvitedEvent;
use CachetHQ\Cachet\Bus\Events\User\UserWasInvitedEvent;
use Illuminate\Contracts\Mail\MailQueue;
use Illuminate\Mail\Message;
@@ -39,7 +39,7 @@ class SendInviteUserEmailHandler
/**
* Handle the event.
*
* @param \CachetHQ\Cachet\Events\UserWasInvitedEvent $event
* @param \CachetHQ\Cachet\Bus\Events\UserWasInvitedEvent $event
*
* @return void
*/

View File

@@ -11,7 +11,6 @@
namespace CachetHQ\Cachet\Composers;
use CachetHQ\Cachet\Facades\Setting;
use GrahamCampbell\Markdown\Facades\Markdown;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Config;
@@ -27,20 +26,27 @@ class AppComposer
*/
public function compose(View $view)
{
$view->withAboutApp(Markdown::convertToHtml(Setting::get('app_about')));
$view->withAppAnalytics(Setting::get('app_analytics'));
$view->withAppAnalyticsGoSquared(Setting::get('app_analytics_gs'));
$view->withAppAnalyticsPiwikUrl(Setting::get('app_analytics_piwik_url'));
$view->withAppAnalyticsPiwikSiteId(Setting::get('app_analytics_piwik_siteid'));
$view->withAppBanner(Setting::get('app_banner'));
$view->withAppBannerStyleFullWidth(Setting::get('style_fullwidth_header'));
$view->withAppBannerType(Setting::get('app_banner_type'));
$view->withAppDomain(Setting::get('app_domain'));
$view->withAppGraphs(Setting::get('display_graphs'));
$view->withAppLocale(Setting::get('app_locale'));
$view->withAppName(Setting::get('app_name'));
$view->withAppStylesheet(Setting::get('stylesheet'));
$view->withAboutApp(Markdown::convertToHtml(Config::get('setting.app_about')));
$view->withAppAnalytics(Config::get('setting.app_analytics'));
$view->withAppAnalyticsGoSquared(Config::get('setting.app_analytics_go_squared'));
$view->withAppAnalyticsPiwikUrl(Config::get('setting.app_analytics_piwik_url'));
$view->withAppAnalyticsPiwikSiteId(Config::get('setting.app_analytics_piwik_siteid'));
$view->withAppBanner(Config::get('setting.app_banner'));
$view->withAppBannerStyleFullWidth(Config::get('setting.style_fullwidth_header'));
$view->withAppBannerType(Config::get('setting.app_banner_type'));
$view->withAppDomain(Config::get('setting.app_domain'));
$view->withAppGraphs(Config::get('setting.display_graphs'));
$view->withAppLocale(Config::get('setting.app_locale'));
$view->withAppStylesheet(Config::get('setting.stylesheet'));
$view->withAppUrl(Config::get('app.url'));
$view->withShowSupport(Setting::get('show_support'));
$view->withAppName($name = Config::get('setting.app_name'));
$view->withShowSupport($support = Config::get('setting.show_support'));
if ($support) {
$view->withSiteTitle(Config::get('setting.app_name').' | Cachet');
} else {
$view->withSiteTitle(Config::get('setting.app_name'));
}
}
}

View File

@@ -11,10 +11,10 @@
namespace CachetHQ\Cachet\Composers;
use CachetHQ\Cachet\Facades\Setting;
use CachetHQ\Cachet\Models\Metric;
use CachetHQ\Cachet\Repositories\Metric\MetricRepository;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Config;
class MetricsComposer
{
@@ -46,14 +46,15 @@ class MetricsComposer
{
$metrics = null;
$metricData = [];
if ($displayMetrics = Setting::get('display_graphs')) {
$metrics = Metric::where('display_chart', 1)->get();
if ($displayMetrics = Config::get('setting.display_graphs')) {
$metrics = Metric::where('display_chart', 1)->orderBy('id')->get();
$metrics->map(function ($metric) use (&$metricData) {
$metricData[$metric->id] = [
'today' => $this->metricRepository->listPointsToday($metric),
'week' => $this->metricRepository->listPointsForWeek($metric),
'month' => $this->metricRepository->listPointsForMonth($metric),
'last_hour' => $this->metricRepository->listPointsLastHour($metric),
'today' => $this->metricRepository->listPointsToday($metric),
'week' => $this->metricRepository->listPointsForWeek($metric),
'month' => $this->metricRepository->listPointsForMonth($metric),
];
});
}

View File

@@ -27,23 +27,33 @@ class StatusPageComposer
*/
public function compose(View $view)
{
$totalComponents = Component::enabled()->count();
$majorOutages = Component::enabled()->status(4)->count();
$isMajorOutage = ($majorOutages / $totalComponents) >= 0.5;
// Default data
$withData = [
'systemStatus' => 'info',
'systemMessage' => trans('cachet.service.bad'),
'favicon' => 'favicon-high-alert',
'system_status' => 'info',
'system_message' => trans_choice('cachet.service.bad', $totalComponents),
'favicon' => 'favicon-high-alert',
];
if (Component::enabled()->notStatus(1)->count() === 0) {
if ($isMajorOutage) {
$withData = [
'system_status' => 'danger',
'system_message' => trans_choice('cachet.service.major', $totalComponents),
'favicon' => 'favicon-high-alert',
];
} elseif (Component::enabled()->notStatus(1)->count() === 0) {
// If all our components are ok, do we have any non-fixed incidents?
$incidents = Incident::notScheduled()->orderBy('created_at', 'desc')->get();
$incidentCount = $incidents->count();
if ($incidentCount === 0 || ($incidentCount >= 1 && (int) $incidents->first()->status === 4)) {
$withData = [
'systemStatus' => 'success',
'systemMessage' => trans('cachet.service.good'),
'favicon' => 'favicon',
'system_status' => 'success',
'system_message' => trans_choice('cachet.service.good', $totalComponents),
'favicon' => 'favicon',
];
}
} else {
@@ -56,7 +66,7 @@ class StatusPageComposer
$scheduledMaintenance = Incident::scheduled()->orderBy('scheduled_at')->get();
// Component & Component Group lists.
$usedComponentGroups = Component::enabled()->where('group_id', '>', 0)->groupBy('group_id')->lists('group_id');
$usedComponentGroups = Component::enabled()->where('group_id', '>', 0)->groupBy('group_id')->pluck('group_id');
$componentGroups = ComponentGroup::whereIn('id', $usedComponentGroups)->orderBy('order')->get();
$ungroupedComponents = Component::enabled()->where('group_id', 0)->orderBy('order')->orderBy('created_at')->get();

Some files were not shown because too many files have changed in this diff Show More