From 33ae9fb8f477e6507e4f0ecf220b2bec04af3d2a Mon Sep 17 00:00:00 2001 From: Jaap Oostinjen Date: Fri, 28 Feb 2020 14:58:49 +0100 Subject: [PATCH 1/3] Add functioanlity to attach components to maintaince --- .../Schedule/CreateScheduleCommandHandler.php | 1 + .../Schedule/DeleteScheduleCommandHandler.php | 1 - .../Schedule/UpdateScheduleCommandHandler.php | 3 ++ .../Dashboard/ScheduleController.php | 5 +- app/Models/Schedule.php | 47 ++++++++++++++++--- .../_componentsSelection.blade.php | 33 +++++++++++++ .../views/dashboard/maintenance/add.blade.php | 1 + .../dashboard/maintenance/edit.blade.php | 1 + 8 files changed, 83 insertions(+), 9 deletions(-) create mode 100644 resources/views/dashboard/maintenance/_componentsSelection.blade.php diff --git a/app/Bus/Handlers/Commands/Schedule/CreateScheduleCommandHandler.php b/app/Bus/Handlers/Commands/Schedule/CreateScheduleCommandHandler.php index 9069eadb9c0..45258b5129f 100644 --- a/app/Bus/Handlers/Commands/Schedule/CreateScheduleCommandHandler.php +++ b/app/Bus/Handlers/Commands/Schedule/CreateScheduleCommandHandler.php @@ -66,6 +66,7 @@ public function handle(CreateScheduleCommand $command) { try { $schedule = Schedule::create($this->filter($command)); + $schedule->attachComponents($command->components); event(new ScheduleWasCreatedEvent($this->auth->user(), $schedule, (bool) $command->notify)); } catch (InvalidArgumentException $e) { throw new ValidationException(new MessageBag([$e->getMessage()])); diff --git a/app/Bus/Handlers/Commands/Schedule/DeleteScheduleCommandHandler.php b/app/Bus/Handlers/Commands/Schedule/DeleteScheduleCommandHandler.php index cf5f62278a5..d0971f27c93 100644 --- a/app/Bus/Handlers/Commands/Schedule/DeleteScheduleCommandHandler.php +++ b/app/Bus/Handlers/Commands/Schedule/DeleteScheduleCommandHandler.php @@ -53,7 +53,6 @@ public function handle(DeleteScheduleCommand $command) $schedule = $command->schedule; event(new ScheduleWasRemovedEvent($this->auth->user(), $schedule)); - $schedule->delete(); } } diff --git a/app/Bus/Handlers/Commands/Schedule/UpdateScheduleCommandHandler.php b/app/Bus/Handlers/Commands/Schedule/UpdateScheduleCommandHandler.php index 72f74328010..00f17b2670f 100644 --- a/app/Bus/Handlers/Commands/Schedule/UpdateScheduleCommandHandler.php +++ b/app/Bus/Handlers/Commands/Schedule/UpdateScheduleCommandHandler.php @@ -16,6 +16,7 @@ use CachetHQ\Cachet\Models\Schedule; use CachetHQ\Cachet\Services\Dates\DateFactory; use Illuminate\Contracts\Auth\Guard; +use Illuminate\Support\Facades\DB; /** * This is the update schedule command handler. @@ -65,6 +66,8 @@ public function handle(UpdateScheduleCommand $command) $schedule->update($this->filter($command)); + $schedule->attachComponents($command->components); + event(new ScheduleWasUpdatedEvent($this->auth->user(), $schedule)); return $schedule; diff --git a/app/Http/Controllers/Dashboard/ScheduleController.php b/app/Http/Controllers/Dashboard/ScheduleController.php index c06216a916f..2e91583477d 100644 --- a/app/Http/Controllers/Dashboard/ScheduleController.php +++ b/app/Http/Controllers/Dashboard/ScheduleController.php @@ -16,6 +16,8 @@ use CachetHQ\Cachet\Bus\Commands\Schedule\DeleteScheduleCommand; use CachetHQ\Cachet\Bus\Commands\Schedule\UpdateScheduleCommand; use CachetHQ\Cachet\Integrations\Contracts\System; +use CachetHQ\Cachet\Models\Component; +use CachetHQ\Cachet\Models\ComponentGroup; use CachetHQ\Cachet\Models\IncidentTemplate; use CachetHQ\Cachet\Models\Schedule; use GrahamCampbell\Binput\Facades\Binput; @@ -79,6 +81,7 @@ public function showAddSchedule() return View::make('dashboard.maintenance.add') ->withPageTitle(trans('dashboard.schedule.add.title').' - '.trans('dashboard.dashboard')) + ->withComponents(Component::all()) ->withIncidentTemplates($incidentTemplates) ->withNotificationsEnabled($this->system->canNotifySubscribers()); } @@ -121,9 +124,9 @@ public function addScheduleAction() public function showEditSchedule(Schedule $schedule) { $incidentTemplates = IncidentTemplate::all(); - return View::make('dashboard.maintenance.edit') ->withPageTitle(trans('dashboard.schedule.edit.title').' - '.trans('dashboard.dashboard')) + ->withComponents(Component::all()) ->withIncidentTemplates($incidentTemplates) ->withSchedule($schedule); } diff --git a/app/Models/Schedule.php b/app/Models/Schedule.php index 6120842666b..e2c803491b1 100644 --- a/app/Models/Schedule.php +++ b/app/Models/Schedule.php @@ -20,6 +20,7 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; +use Illuminate\Support\Facades\DB; use McCool\LaravelAutoPresenter\HasPresenter; class Schedule extends Model implements HasPresenter @@ -57,7 +58,7 @@ class Schedule extends Model implements HasPresenter * @var string[] */ protected $attributes = [ - 'status' => self::UPCOMING, + 'status' => self::UPCOMING, 'completed_at' => null, ]; @@ -67,9 +68,9 @@ class Schedule extends Model implements HasPresenter * @var string[] */ protected $casts = [ - 'name' => 'string', - 'message' => 'string', - 'status' => 'int', + 'name' => 'string', + 'message' => 'string', + 'status' => 'int', 'scheduled_at' => 'datetime', 'completed_at' => 'datetime', ]; @@ -95,9 +96,9 @@ class Schedule extends Model implements HasPresenter * @var string[] */ public $rules = [ - 'name' => 'required|string', - 'message' => 'nullable|string', - 'status' => 'required|int|between:0,2', + 'name' => 'required|string', + 'message' => 'nullable|string', + 'status' => 'required|int|between:0,2', ]; /** @@ -143,6 +144,26 @@ public function components() return $this->hasMany(ScheduleComponent::class); } + /** + * Added function to connect components trough the DB directly. Terrible solution. Works for me. + */ + public function attachComponents(array $components) + { + $this->detachAllComponents(); + foreach ($components as $componentId => $component){ + if(isset($component['affected']) && $component['affected']){ + $data = [ + 'schedule_id' => $this->id, + 'component_id' => (int) $componentId, + 'component_status' => (int) $component['status'], + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now() + ]; + DB::table('schedule_components')->insert($data); + } + } + } + /** * Scope schedules that are uncompleted. * @@ -216,4 +237,16 @@ public function getPresenterClass() { return SchedulePresenter::class; } + + private function detachAllComponents(): void + { + DB::table('schedule_components')->where('schedule_id', $this->id)->delete(); + } + + public function delete() + { + $this->detachAllComponents(); + // Do some stuff before delete + return parent::delete(); + } } diff --git a/resources/views/dashboard/maintenance/_componentsSelection.blade.php b/resources/views/dashboard/maintenance/_componentsSelection.blade.php new file mode 100644 index 00000000000..7ebad97f106 --- /dev/null +++ b/resources/views/dashboard/maintenance/_componentsSelection.blade.php @@ -0,0 +1,33 @@ +
+ @if(!$components->isEmpty()) +
+
+ + @foreach($components as $component) +
+ @php + $currentComponentIsSelected = isset($schedule) ? $schedule->components()->where('component_id', $component->id)->first() : null; + if($currentComponentIsSelected){ + $currentStatus = $currentComponentIsSelected->component_status; + }else{ + $currentStatus = 1; + } + @endphp + + +
+ @foreach(trans('cachet.components.status') as $statusID => $status) +
+ +
+ @endforeach +
+
+ @endforeach +
+
+ @endif +
diff --git a/resources/views/dashboard/maintenance/add.blade.php b/resources/views/dashboard/maintenance/add.blade.php index 07c5d6fa7ea..17cb5211b5c 100644 --- a/resources/views/dashboard/maintenance/add.blade.php +++ b/resources/views/dashboard/maintenance/add.blade.php @@ -56,6 +56,7 @@ + @include('dashboard.maintenance._componentsSelection') @if($notificationsEnabled) diff --git a/resources/views/dashboard/maintenance/edit.blade.php b/resources/views/dashboard/maintenance/edit.blade.php index 456e0797ae8..0ffef9b7ade 100644 --- a/resources/views/dashboard/maintenance/edit.blade.php +++ b/resources/views/dashboard/maintenance/edit.blade.php @@ -56,6 +56,7 @@ + @include('dashboard.maintenance._componentsSelection')
From d8ad05db42d63e21f3248981d7a0b3a0643d2fd2 Mon Sep 17 00:00:00 2001 From: Jaap Oostinjen Date: Mon, 2 Mar 2020 14:01:51 +0100 Subject: [PATCH 2/3] Turn off something --- resources/views/partials/schedule.blade.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/partials/schedule.blade.php b/resources/views/partials/schedule.blade.php index a077589bbe5..7dde8868d15 100644 --- a/resources/views/partials/schedule.blade.php +++ b/resources/views/partials/schedule.blade.php @@ -12,10 +12,10 @@ {!! $schedule->formatted_message !!}
@if($schedule->components->count() > 0) -
- @foreach($schedule->components as $affectedComponent) - {{ $affectedComponent->component->name }} - @endforeach +{{--
--}} +{{-- @foreach($schedule->components as $affectedComponent)--}} +{{-- {{ $affectedComponent->component->name }}--}} +{{-- @endforeach--}} @endif @endforeach From 0b64799602e6ac3482969d75357c9f7a88359965 Mon Sep 17 00:00:00 2001 From: Jaap Date: Fri, 22 May 2026 07:16:50 +0000 Subject: [PATCH 3/3] stray changes found on server --- config/bugsnag.php | 278 +++++++++++++++++++++ database/backups/2020-02-26 13.29.45.gz | Bin 0 -> 2762 bytes database/backups/2020-02-26 13.31.51.gz | Bin 0 -> 2761 bytes database/backups/2020-02-26 13.41.04.gz | Bin 0 -> 2761 bytes resources/views/vendor/feed/atom.blade.php | 29 +++ resources/views/vendor/feed/rss.blade.php | 89 +++++++ 6 files changed, 396 insertions(+) create mode 100644 config/bugsnag.php create mode 100644 database/backups/2020-02-26 13.29.45.gz create mode 100644 database/backups/2020-02-26 13.31.51.gz create mode 100644 database/backups/2020-02-26 13.41.04.gz create mode 100644 resources/views/vendor/feed/atom.blade.php create mode 100644 resources/views/vendor/feed/rss.blade.php diff --git a/config/bugsnag.php b/config/bugsnag.php new file mode 100644 index 00000000000..63f49cb6885 --- /dev/null +++ b/config/bugsnag.php @@ -0,0 +1,278 @@ + env('BUGSNAG_API_KEY', ''), + + /* + |-------------------------------------------------------------------------- + | App Type + |-------------------------------------------------------------------------- + | + | Set the type of application executing the current code. + | + */ + + 'app_type' => env('BUGSNAG_APP_TYPE'), + + /* + |-------------------------------------------------------------------------- + | App Version + |-------------------------------------------------------------------------- + | + | Set the version of application executing the current code. + | + */ + + 'app_version' => env('BUGSNAG_APP_VERSION'), + + /* + |-------------------------------------------------------------------------- + | Batch Sending + |-------------------------------------------------------------------------- + | + | Set to true to send the errors through to Bugsnag when the PHP process + | shuts down, in order to prevent your app waiting on HTTP requests. + | + | Setting this to false will send an HTTP request straight away for each + | error. + | + */ + + 'batch_sending' => env('BUGSNAG_BATCH_SENDING'), + + /* + |-------------------------------------------------------------------------- + | Endpoint + |-------------------------------------------------------------------------- + | + | Set what server the Bugsnag notifier should send errors to. By default + | this is set to 'https://notify.bugsnag.com', but for Bugsnag Enterprise + | this should be the URL to your Bugsnag instance. + | + */ + + 'endpoint' => env('BUGSNAG_ENDPOINT'), + + /* + |-------------------------------------------------------------------------- + | Filters + |-------------------------------------------------------------------------- + | + | Use this if you want to ensure you don't send sensitive data such as + | passwords, and credit card numbers to our servers. Any keys which + | contain these strings will be filtered. + | + */ + + 'filters' => empty(env('BUGSNAG_FILTERS')) ? ['password'] : explode(',', str_replace(' ', '', env('BUGSNAG_FILTERS'))), + + /* + |-------------------------------------------------------------------------- + | Hostname + |-------------------------------------------------------------------------- + | + | You can set the hostname of your server to something specific for you to + | identify it by if needed. + | + */ + + 'hostname' => env('BUGSNAG_HOSTNAME'), + + /* + |-------------------------------------------------------------------------- + | Proxy + |-------------------------------------------------------------------------- + | + | This is where you can set the proxy settings you'd like us to use when + | communicating with Bugsnag when reporting errors. + | + */ + + 'proxy' => array_filter([ + 'http' => env('HTTP_PROXY'), + 'https' => env('HTTPS_PROXY'), + 'no' => empty(env('NO_PROXY')) ? null : explode(',', str_replace(' ', '', env('NO_PROXY'))), + ]), + + /* + |-------------------------------------------------------------------------- + | Project Root + |-------------------------------------------------------------------------- + | + | Bugsnag marks stacktrace lines as in-project if they come from files + | inside your “project root”. You can set this here. + | + | If this is not set, we will automatically try to detect it. + | + */ + + 'project_root' => env('BUGSNAG_PROJECT_ROOT'), + + /* + |-------------------------------------------------------------------------- + | Strip Path + |-------------------------------------------------------------------------- + | + | You can set a strip path to have it also trimmed from the start of any + | filepath in your stacktraces. + | + | If this is not set, we will automatically try to detect it. + | + */ + + 'strip_path' => env('BUGSNAG_STRIP_PATH'), + + /* + |-------------------------------------------------------------------------- + | Query + |-------------------------------------------------------------------------- + | + | Enable this if you'd like us to automatically record all queries executed + | as breadcrumbs. + | + */ + + 'query' => env('BUGSNAG_QUERY', true), + + /* + |-------------------------------------------------------------------------- + | Bindings + |-------------------------------------------------------------------------- + | + | Enable this if you'd like us to include the query bindings in our query + | breadcrumbs. + | + */ + + 'bindings' => env('BUGSNAG_QUERY_BINDINGS', false), + + /* + |-------------------------------------------------------------------------- + | Release Stage + |-------------------------------------------------------------------------- + | + | Set the release stage to use when sending notifications to Bugsnag. + | + | Leaving this unset will default to using the application environment. + | + */ + + 'release_stage' => env('BUGSNAG_RELEASE_STAGE'), + + /* + |-------------------------------------------------------------------------- + | Notify Release Stages + |-------------------------------------------------------------------------- + | + | Set which release stages should send notifications to Bugsnag. + | + */ + + 'notify_release_stages' => empty(env('BUGSNAG_NOTIFY_RELEASE_STAGES')) ? null : explode(',', str_replace(' ', '', env('BUGSNAG_NOTIFY_RELEASE_STAGES'))), + + /* + |-------------------------------------------------------------------------- + | Send Code + |-------------------------------------------------------------------------- + | + | Bugsnag automatically sends a small snippet of the code that crashed to + | help you diagnose even faster from within your dashboard. If you don’t + | want to send this snippet, then set this to false. + | + */ + + 'send_code' => env('BUGSNAG_SEND_CODE', true), + + /* + |-------------------------------------------------------------------------- + | Callbacks + |-------------------------------------------------------------------------- + | + | Enable this if you'd like us to enable our default set of notification + | callbacks. These add things like the cookie information and session + | details to the error to be sent to Bugsnag. + | + | If you'd like to add your own callbacks, you can call the + | Bugsnag::registerCallback method from the boot method of your app + | service provider. + | + */ + + 'callbacks' => env('BUGSNAG_CALLBACKS', true), + + /* + |-------------------------------------------------------------------------- + | User + |-------------------------------------------------------------------------- + | + | Enable this if you'd like us to set the current user logged in via + | Laravel's authentication system. + | + | If you'd like to add your own user resolver, you can do this by using + | callbacks via Bugsnag::registerCallback. + | + */ + + 'user' => env('BUGSNAG_USER', true), + + /* + |-------------------------------------------------------------------------- + | Logger Notify Level + |-------------------------------------------------------------------------- + | + | This sets the level at which a logged message will trigger a notification + | to Bugsnag. By default this level will be 'notice'. + | + | Must be one of the Psr\Log\LogLevel levels from the Psr specification. + | + */ + + 'logger_notify_level' => env('BUGSNAG_LOGGER_LEVEL'), + + /* + |-------------------------------------------------------------------------- + | Auto Capture Sessions + |-------------------------------------------------------------------------- + | + | Enable this to start tracking sessions and deliver them to Bugsnag. + | + */ + + 'auto_capture_sessions' => env('BUGSNAG_CAPTURE_SESSIONS', false), + + /* + |-------------------------------------------------------------------------- + | Sessions Endpoint + |-------------------------------------------------------------------------- + | + | Sets a url to send tracked sessions to. + | + */ + + 'session_endpoint' => env('BUGSNAG_SESSION_ENDPOINT'), + + /* + |-------------------------------------------------------------------------- + | Builds Endpoint + |-------------------------------------------------------------------------- + | + | Sets a url to send build reports to. + | + */ + + 'build_endpoint' => env('BUGSNAG_BUILD_ENDPOINT'), + +]; diff --git a/database/backups/2020-02-26 13.29.45.gz b/database/backups/2020-02-26 13.29.45.gz new file mode 100644 index 0000000000000000000000000000000000000000..22d75ed6b84897edbd4e4256886a636e96ac26d3 GIT binary patch literal 2762 zcmV;*3N`f~iwFqGa#mgd12tteHa9Y3IWsmfIWhp%Tw7P;I1+wdeuefaFbj-t2?={R zr!$GWC#OTgB%x<#UWBnl@U~-TePQ6=Pf5OCmk{c1VxH8Lz! zF`nTgf}gSCDvydou92#!&%~v$i$*_Ga!KqLVk7wP=$82pU!e=md-P1#17-V{oOH>b zoc#RLKP8Umc(jyP=+k^U#-m?{i{WS`FEBj9qv=GRt!_SjDte55`uX2GTUf};`{`<# zYa)1F*2a7~9j+$x8GM?}>pXUpC@@0m<%74TyHT-2NqseC^|7WrUj|c$S@i@v0 z(Xi@Z)zFE_ID>A`r%&p$Vk@dkZ0ry>{4!^bLex#{B%_5qT*-khfd=UG1fhrTu6ULsYtCmKvsv|H1n%z&Q=Tz)PF+6C(C9iHh0rI-lZN&w;J|Nw6 zPkH_<1@OHH!K?@RVbF}W_CMOsDbw@p1!kP{q-hEs?VnYkEGmh5*J ze|3(V3t z#BmkKzA0#=h_}`1V(%7{+u`C5#;sFosx$i3XIjRbn2itXrbb>V>-^!imUo3-oTgyT zU#i)dgV!ZyPVj&nb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Sb_M zG6jB+!{tXya@0tejuunZ6B&+K;M^ZjTS*nWV2Vrr#8*e`kEPD>o7vKCyL zg*yJFSse;4xx*=a^OJ9hlnvv{l9E>^' !!} +> + {!! $channel['title'] !!} + + + {{ $channel['link'] }} + + +@if (!empty($channel['logo'])) + {{ $channel['logo'] }} +@endif +@if (!empty($channel['icon'])) + {{ $channel['icon'] }} +@endif + {{ $channel['pubdate'] }} +@foreach($items as $item) + + + {{ $item['author'] }} + + <![CDATA[{!! $item['title'] !!}]]> + + {{ $item['link'] }} + + + {{ $item['pubdate'] }} + +@endforeach + diff --git a/resources/views/vendor/feed/rss.blade.php b/resources/views/vendor/feed/rss.blade.php new file mode 100644 index 00000000000..812e9cd5f5d --- /dev/null +++ b/resources/views/vendor/feed/rss.blade.php @@ -0,0 +1,89 @@ +{!! '<'.'?'.'xml version="1.0" encoding="UTF-8" ?>' !!} +> + + {!! $channel['title'] !!} + {{ Request::url() }} + + + @if (!empty($channel['copyright'])) + {{ $channel['copyright'] }} + @endif + @if (!empty($channel['color'])) + {{ $channel['color'] }} + @endif + @if (!empty($channel['cover'])) + + @endif + @if (!empty($channel['icon'])) + {{ $channel['icon'] }} + @endif + @if (!empty($channel['logo'])) + {{ $channel['logo'] }} + + {{ $channel['logo'] }} + {{ $channel['title'] }} + {{ Request::url() }} + + @endif + @if (!empty($channel['related'])) + + @endif + @if (!empty($channel['ga'])) + + @endif + {{ $channel['lang'] }} + {{ $channel['pubdate'] }} + @foreach($items as $item) + + <![CDATA[{!! $item['title'] !!}]]> + @if (!empty($item['category'])) + {{ $item['category'] }} + @endif + {{ $item['link'] }} + {{ $item['link'] }} + + @if (!empty($item['content'])) + + @endif + {{ $item['author'] }} + {{ $item['pubdate'] }} + @if (!empty($item['enclosure'])) + $v) + {!! $k.'="'.$v.'" ' !!} + @endforeach + /> + @endif + @if (!empty($item['media:content'])) + $v) + {!! $k.'="'.$v.'" ' !!} + @endforeach + /> + @endif + @if (!empty($item['media:thumbnail'])) + $v) + {!! $k.'="'.$v.'" ' !!} + @endforeach + /> + @endif + @if (!empty($item['media:title'])) + {{ $item['media:title'] }} + @endif + @if (!empty($item['media:description'])) + {{ $item['media:description'] }} + @endif + @if (!empty($item['media:keywords'])) + {{ $item['media:title'] }} + @endif + @if (!empty($item['media:rating'])) + {{ $item['media:rating'] }} + @endif + @if (!empty($item['creativeCommons:license'])) + {{ $item['creativeCommons:license'] }} + @endif + + @endforeach + +