diff --git a/modules/monitoring/application/views/scripts/downtime/remove.phtml b/modules/monitoring/application/views/scripts/downtime/remove.phtml new file mode 100644 index 000000000..57fe36655 --- /dev/null +++ b/modules/monitoring/application/views/scripts/downtime/remove.phtml @@ -0,0 +1,11 @@ +
+ + compact): ?> + tabs; ?> + + + render('partials/downtime/downtime-header.phtml'); ?> +
+
+ +
\ No newline at end of file diff --git a/modules/monitoring/application/views/scripts/downtime/show.phtml b/modules/monitoring/application/views/scripts/downtime/show.phtml index 6ecc11a7b..aed35b9ac 100644 --- a/modules/monitoring/application/views/scripts/downtime/show.phtml +++ b/modules/monitoring/application/views/scripts/downtime/show.phtml @@ -3,75 +3,8 @@ tabs; ?> - - - - - -
- is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?> -
- dateTimeRenderer( - ($downtime->is_in_effect ? $downtime->end : $downtime->start), - true - )->render( - $this->translate('on %s', 'datetime'), - $this->translate('at %s', 'time'), - $this->translate('in %s', 'timespan') - ); - ?> -
- - is_flexible): ?> - is_in_effect): ?> - isService - ? $this->translate('This flexible service downtime was started on %s at %s and lasts for %s until %s at %s.') - : $this->translate('This flexible host downtime was started on %s at %s and lasts for %s until %s at %s.'), - date('d.m.y', $downtime->start), - date('H:i', $downtime->start), - $this->format()->duration($downtime->duration), - date('d.m.y', $downtime->end), - date('H:i', $downtime->end) - ); ?> - - isService - ? $this->translate('This flexible service downtime has been scheduled to start between %s - %s and to last for %s.') - : $this->translate('This flexible host downtime has been scheduled to start between %s - %s and to last for %s.'), - date('d.m.y H:i', $downtime->scheduled_start), - date('d.m.y H:i', $downtime->scheduled_end), - $this->format()->duration($downtime->duration) - ); ?> - - - is_in_effect): ?> - isService - ? $this->translate('This fixed service downtime was started on %s at %s and expires on %s at %s.') - : $this->translate('This fixed host downtime was started on %s at %s and expires on %s at %s.'), - date('d.m.y', $downtime->start), - date('H:i', $downtime->start), - date('d.m.y', $downtime->end), - date('H:i', $downtime->end) - ); ?> - - isService - ? $this->translate('This fixed service downtime has been scheduled to start on %s at %s and to end on %s at %s.') - : $this->translate('This fixed host downtime has been scheduled to start on %s at %s and to end on %s at %s.'), - date('d.m.y', $downtime->scheduled_start), - date('H:i', $downtime->scheduled_start), - date('d.m.y', $downtime->scheduled_end), - date('H:i', $downtime->scheduled_end) - ); ?> - - - -
+ render('partials/downtime/downtime-header.phtml'); ?> -

translate('Downtime detail information') ?>

@@ -177,7 +110,7 @@ diff --git a/modules/monitoring/application/views/scripts/downtimes/remove-all.phtml b/modules/monitoring/application/views/scripts/downtimes/remove-all.phtml new file mode 100644 index 000000000..fed0e12f7 --- /dev/null +++ b/modules/monitoring/application/views/scripts/downtimes/remove-all.phtml @@ -0,0 +1,12 @@ +
+ + compact): ?> + tabs; ?> + + + render('partials/downtime/downtimes-header.phtml'); ?> +
+ +
+ +
\ No newline at end of file diff --git a/modules/monitoring/application/views/scripts/downtimes/show.phtml b/modules/monitoring/application/views/scripts/downtimes/show.phtml index caff167f2..98999f012 100644 --- a/modules/monitoring/application/views/scripts/downtimes/show.phtml +++ b/modules/monitoring/application/views/scripts/downtimes/show.phtml @@ -3,98 +3,8 @@ compact): ?> tabs; ?> -

-

translate('Commands') ?> - +
- - 5) { - continue; - } ?> - - - - - - -
- is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?> -
- dateTimeRenderer( - ($downtime->is_in_effect ? $downtime->end : $downtime->start), - true - )->render( - $this->translate('on %s', 'datetime'), - $this->translate('at %s', 'time'), - $this->translate('in %s', 'timespan') - ); - ?> -
- isService): ?> - icon('service', $this->translate('Service')) ?> - service ?> on host_name ?>. - - icon('host', $this->translate('Host')) ?> - host_name ?>. - - - is_flexible): ?> - is_in_effect): ?> - isService - ? $this->translate('This flexible service downtime was started on %s at %s and lasts for %s until %s at %s.') - : $this->translate('This flexible host downtime was started on %s at %s and lasts for %s until %s at %s.'), - date('d.m.y', $downtime->start), - date('H:i', $downtime->start), - $this->format()->duration($downtime->duration), - date('d.m.y', $downtime->end), - date('H:i', $downtime->end) - ); ?> - - isService - ? $this->translate('This flexible service downtime has been scheduled to start between %s - %s and to last for %s.') - : $this->translate('This flexible host downtime has been scheduled to start between %s - %s and to last for %s.'), - date('d.m.y H:i', $downtime->scheduled_start), - date('d.m.y H:i', $downtime->scheduled_end), - $this->format()->duration($downtime->duration) - ); ?> - - - is_in_effect): ?> - isService - ? $this->translate('This fixed service downtime was started on %s at %s and expires on %s at %s.') - : $this->translate('This fixed host downtime was started on %s at %s and expires on %s at %s.'), - date('d.m.y', $downtime->start), - date('H:i', $downtime->start), - date('d.m.y', $downtime->end), - date('H:i', $downtime->end) - ); ?> - - isService - ? $this->translate('This fixed service downtime has been scheduled to start on %s at %s and to end on %s at %s.') - : $this->translate('This fixed host downtime has been scheduled to start on %s at %s and to end on %s at %s.'), - date('d.m.y', $downtime->scheduled_start), - date('H:i', $downtime->scheduled_start), - date('d.m.y', $downtime->scheduled_end), - date('H:i', $downtime->scheduled_end) - ); ?> - - -
-

- qlink( - sprintf($this->translate('List all %d downtimes …'), count($downtimes)), - $listAllLink, - null, - array( - 'title' => $this->translate('List all'), - 'data-base-target' => "_next" - ) - ) ?> -

+ + render('partials/downtime/downtimes-header.phtml'); ?>

@@ -119,5 +29,5 @@ ) ) ?>
-

+

diff --git a/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml new file mode 100644 index 000000000..92759a12a --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtime-header.phtml @@ -0,0 +1,67 @@ + + + + + +
+ is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?> +
+ dateTimeRenderer( + ($downtime->is_in_effect ? $downtime->end : $downtime->start), + true + )->render( + $this->translate('on %s', 'datetime'), + $this->translate('at %s', 'time'), + $this->translate('in %s', 'timespan') + ); + ?> +
+ + is_flexible): ?> + is_in_effect): ?> + isService + ? $this->translate('This flexible service downtime was started on %s at %s and lasts for %s until %s at %s.') + : $this->translate('This flexible host downtime was started on %s at %s and lasts for %s until %s at %s.'), + date('d.m.y', $downtime->start), + date('H:i', $downtime->start), + $this->format()->duration($downtime->duration), + date('d.m.y', $downtime->end), + date('H:i', $downtime->end) + ); ?> + + isService + ? $this->translate('This flexible service downtime has been scheduled to start between %s - %s and to last for %s.') + : $this->translate('This flexible host downtime has been scheduled to start between %s - %s and to last for %s.'), + date('d.m.y H:i', $downtime->scheduled_start), + date('d.m.y H:i', $downtime->scheduled_end), + $this->format()->duration($downtime->duration) + ); ?> + + + is_in_effect): ?> + isService + ? $this->translate('This fixed service downtime was started on %s at %s and expires on %s at %s.') + : $this->translate('This fixed host downtime was started on %s at %s and expires on %s at %s.'), + date('d.m.y', $downtime->start), + date('H:i', $downtime->start), + date('d.m.y', $downtime->end), + date('H:i', $downtime->end) + ); ?> + + isService + ? $this->translate('This fixed service downtime has been scheduled to start on %s at %s and to end on %s at %s.') + : $this->translate('This fixed host downtime has been scheduled to start on %s at %s and to end on %s at %s.'), + date('d.m.y', $downtime->scheduled_start), + date('H:i', $downtime->scheduled_start), + date('d.m.y', $downtime->scheduled_end), + date('H:i', $downtime->scheduled_end) + ); ?> + + + +
diff --git a/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml b/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml new file mode 100644 index 000000000..54cd0210c --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/downtime/downtimes-header.phtml @@ -0,0 +1,92 @@ + + + 5) { + continue; + } ?> + + + + + + +
+ is_in_effect ? $this->translate('Expires') : $this->translate('Starts'); ?> +
+ dateTimeRenderer( + ($downtime->is_in_effect ? $downtime->end : $downtime->start), + true + )->render( + $this->translate('on %s', 'datetime'), + $this->translate('at %s', 'time'), + $this->translate('in %s', 'timespan') + ); + ?> +
+ isService): ?> + icon('service', $this->translate('Service')) ?> + service ?> on host_name ?>. + + icon('host', $this->translate('Host')) ?> + host_name ?>. + + + is_flexible): ?> + is_in_effect): ?> + isService + ? $this->translate('This flexible service downtime was started on %s at %s and lasts for %s until %s at %s.') + : $this->translate('This flexible host downtime was started on %s at %s and lasts for %s until %s at %s.'), + date('d.m.y', $downtime->start), + date('H:i', $downtime->start), + $this->format()->duration($downtime->duration), + date('d.m.y', $downtime->end), + date('H:i', $downtime->end) + ); ?> + + isService + ? $this->translate('This flexible service downtime has been scheduled to start between %s - %s and to last for %s.') + : $this->translate('This flexible host downtime has been scheduled to start between %s - %s and to last for %s.'), + date('d.m.y H:i', $downtime->scheduled_start), + date('d.m.y H:i', $downtime->scheduled_end), + $this->format()->duration($downtime->duration) + ); ?> + + + is_in_effect): ?> + isService + ? $this->translate('This fixed service downtime was started on %s at %s and expires on %s at %s.') + : $this->translate('This fixed host downtime was started on %s at %s and expires on %s at %s.'), + date('d.m.y', $downtime->start), + date('H:i', $downtime->start), + date('d.m.y', $downtime->end), + date('H:i', $downtime->end) + ); ?> + + isService + ? $this->translate('This fixed service downtime has been scheduled to start on %s at %s and to end on %s at %s.') + : $this->translate('This fixed host downtime has been scheduled to start on %s at %s and to end on %s at %s.'), + date('d.m.y', $downtime->scheduled_start), + date('H:i', $downtime->scheduled_start), + date('d.m.y', $downtime->scheduled_end), + date('H:i', $downtime->scheduled_end) + ); ?> + + +
+ +

+ qlink( + sprintf($this->translate('List all %d downtimes …'), count($downtimes)), + $listAllLink, + null, + array( + 'title' => $this->translate('List all'), + 'data-base-target' => "_next" + ) + ) ?> +

\ No newline at end of file