| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- <?php include 'admin_header.php'; ?>
- <style>
- .us-timeline {
- position: relative;
- padding: 20px 0;
- max-width: 700px;
- margin: 0 auto;
- }
- .us-timeline::before {
- content: '';
- position: absolute;
- left: 84px;
- top: 0;
- bottom: 0;
- width: 3px;
- background: #3c8dbc;
- }
- .us-event {
- position: relative;
- margin-bottom: 0;
- padding-left: 120px;
- padding-bottom: 30px;
- }
- .us-event:last-child {
- padding-bottom: 0;
- }
- .us-event-number {
- position: absolute;
- left: 0;
- top: 5px;
- font-size: 48px;
- font-weight: 700;
- color: #d2d6de;
- line-height: 1;
- text-align: right;
- width: 60px;
- }
- .us-event-dot {
- position: absolute;
- left: 75px;
- top: 18px;
- width: 22px;
- height: 22px;
- border-radius: 50%;
- background: #3c8dbc;
- border: 3px solid #fff;
- box-shadow: 0 0 0 2px #3c8dbc;
- z-index: 1;
- }
- .us-event-dot.uuid_change {
- background: #f39c12;
- box-shadow: 0 0 0 2px #f39c12;
- }
- .us-event-dot.redirect,
- .us-event-dot.return {
- background: #00a65a;
- box-shadow: 0 0 0 2px #00a65a;
- }
- .us-event-dot.ajax_request {
- background: #605ca8;
- box-shadow: 0 0 0 2px #605ca8;
- }
- .us-event-dot.ajax_response {
- background: #00c0ef;
- box-shadow: 0 0 0 2px #00c0ef;
- }
- .us-event-card {
- background: #fff;
- border: 1px solid #ddd;
- border-left: 4px solid #3c8dbc;
- border-radius: 4px;
- padding: 14px 18px;
- box-shadow: 0 1px 4px rgba(0,0,0,0.06);
- transition: box-shadow 0.2s;
- }
- .us-event-card:hover {
- box-shadow: 0 3px 12px rgba(0,0,0,0.12);
- }
- .us-event-card.uuid_change {
- border-left-color: #f39c12;
- }
- .us-event-card.redirect,
- .us-event-card.return {
- border-left-color: #00a65a;
- }
- .us-event-card.ajax_request {
- border-left-color: #605ca8;
- }
- .us-event-card.ajax_response {
- border-left-color: #00c0ef;
- }
- .us-event-type {
- font-size: 16px;
- font-weight: 700;
- margin-bottom: 2px;
- }
- .us-event-name {
- font-size: 14px;
- color: #555;
- margin-bottom: 6px;
- }
- .us-event-time {
- font-size: 12px;
- font-style: italic;
- color: #888;
- margin-bottom: 4px;
- }
- .us-event-meta {
- font-size: 11px;
- color: #aaa;
- }
- .us-event-meta span {
- margin-right: 15px;
- }
- .us-event-url {
- display: inline-block;
- max-width: 350px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- vertical-align: bottom;
- cursor: default;
- }
- .us-event-data {
- margin-top: 8px;
- padding: 8px 10px;
- background: #f7f7f7;
- border-radius: 3px;
- font-size: 12px;
- font-family: monospace;
- word-break: break-all;
- max-height: 200px;
- overflow-y: auto;
- display: none;
- }
- .us-event-toggle {
- cursor: pointer;
- color: #3c8dbc;
- font-size: 11px;
- margin-top: 6px;
- display: inline-block;
- }
- .us-event-toggle:hover {
- text-decoration: underline;
- }
- .us-badge {
- display: inline-block;
- padding: 2px 8px;
- border-radius: 3px;
- color: #fff;
- font-size: 11px;
- font-weight: 600;
- }
- .us-badge.click { background: #3c8dbc; }
- .us-badge.page_view { background: #3c8dbc; }
- .us-badge.ajax_request { background: #605ca8; }
- .us-badge.ajax_response { background: #00c0ef; }
- .us-badge.redirect { background: #00a65a; }
- .us-badge.return { background: #00a65a; }
- .us-badge.uuid_change { background: #f39c12; }
- .us-badge.form_submit { background: #d81b60; }
- </style>
- <div class="content-wrapper">
- <section class="content-header">
- <h1>
- User Story Timeline
- <small><code><?=htmlspecialchars($uuid)?></code></small>
- </h1>
- <div style="margin-top: 10px;">
- <a href="/userstory" class="btn btn-default btn-sm"><i class="fa fa-arrow-left"></i> Back to list</a>
- </div>
- </section>
- <section class="content">
- <div class="box box-info">
- <div class="box-header with-border">
- <h3 class="box-title"><i class="fa fa-clock-o"></i> Timeline</h3>
- <span class="badge bg-blue pull-right"><?=count($events)?> events</span>
- </div>
- <div class="box-body">
- <div class="us-timeline">
- <?php foreach ($events as $i => $event) : ?>
- <div class="us-event">
- <div class="us-event-number"><?=$i + 1?></div>
- <div class="us-event-dot <?=htmlspecialchars($event->event_type)?>"></div>
- <div class="us-event-card <?=htmlspecialchars($event->event_type)?>">
- <div class="us-event-type">
- <span class="us-badge <?=htmlspecialchars($event->event_type)?>"><?=htmlspecialchars($event->event_type)?></span>
- <?=htmlspecialchars($event->event_name)?>
- </div>
- <div class="us-event-time"><?=$event->created_at?></div>
- <div class="us-event-meta">
- <span><i class="fa fa-globe"></i> <?=htmlspecialchars($event->ip_address ?: '-')?></span>
- <span><i class="fa fa-link"></i> <span class="us-event-url" title="<?=htmlspecialchars($event->page_url ?: '-')?>"><?=htmlspecialchars($event->page_url ?: '-')?></span></span>
- </div>
- <?php if ($event->event_type === 'uuid_change' && !empty($event->previous_uuid)) : ?>
- <div class="us-event-meta" style="margin-top: 4px;">
- <span><i class="fa fa-exchange"></i> <strong><?=htmlspecialchars($event->previous_uuid)?></strong> → <strong><?=htmlspecialchars($event->uuid)?></strong></span>
- </div>
- <?php endif; ?>
- <?php if (!empty($event->hotel)) : ?>
- <div class="us-event-meta" style="margin-top: 4px;">
- <span><i class="fa fa-building"></i> Hotel: <?=htmlspecialchars($event->hotel)?></span>
- </div>
- <?php endif; ?>
- <?php if (!empty($event->order_id)) : ?>
- <div class="us-event-meta" style="margin-top: 4px;">
- <span><i class="fa fa-shopping-cart"></i> Order: <?=htmlspecialchars($event->order_id)?></span>
- </div>
- <?php endif; ?>
- <?php if (!empty($event->event_data) && $event->event_data !== '""') : ?>
- <span class="us-event-toggle" onclick="$(this).next().slideToggle(200)"><i class="fa fa-code"></i> Show data</span>
- <div class="us-event-data"><pre style="margin:0;white-space:pre-wrap;"><?=htmlspecialchars($event->event_data)?></pre></div>
- <?php endif; ?>
- <?php if (!empty($event->cart) && $event->cart !== '""') : ?>
- <span class="us-event-toggle" onclick="$(this).next().slideToggle(200)"><i class="fa fa-shopping-basket"></i> Show cart</span>
- <div class="us-event-data"><pre style="margin:0;white-space:pre-wrap;"><?=htmlspecialchars($event->cart)?></pre></div>
- <?php endif; ?>
- </div>
- </div>
- <?php endforeach; ?>
- </div>
- </div>
- </div>
- </section>
- </div>
- <?php include 'admin_footer.php'; ?>
|