index.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * @var yii\web\View $this
  4. */
  5. $this->title = 'My Yii Application';
  6. ?>
  7. <div class="box">
  8. <div class="box-header">
  9. <h3 class="box-title">Responsive Hover Table</h3>
  10. <form action="/logger/search" method="POST">
  11. <div class="box-tools">
  12. <div class="input-group" style="width: 150px;">
  13. <input type="text" name="kw" class="form-control input-sm pull-right" placeholder="Search" value="social">
  14. <div class="input-group-btn">
  15. <input class="btn btn-sm btn-default" type="submit" value="搜索"><i class="fa fa-search"></i></input>
  16. </div>
  17. </div>
  18. </div>
  19. </form>
  20. </div><!-- /.box-header -->
  21. <div class="box-body table-responsive no-padding">
  22. <table class="table table-hover">
  23. <tbody><tr>
  24. <th>错误域</th>
  25. <th>日志细节</th>
  26. <th>时间</th>
  27. <!-- <th>debug</th>-->
  28. <th>级别</th>
  29. </tr>
  30. <?php foreach ($rows as $row) { ?>
  31. <tr>
  32. <td><?= $row['name'] ?></td>
  33. <td class="click-show-traces" data-id="<?= $row['_id'] ?>">
  34. <div class="box box-default-clear collapsed-box">
  35. <div class="box-header with-border">
  36. <span class="box-title f14"><?= $row['log'] ?></span>
  37. <div class="box-tools pull-right">
  38. <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
  39. </div><!-- /.box-tools -->
  40. </div><!-- /.box-header -->
  41. <div class="box-body" style="display: none;">
  42. <?= join('<br>', (array)json_decode($row['trace'])) ?>
  43. </div>
  44. </div>
  45. </td>
  46. <td><?= $row['time'] ?></td>
  47. <!-- <td>--><?//= json_decode($row['trace'])[0] ?><!--</td>-->
  48. <td><span class="label <?= \Yii::t('log', 'class-' . $row['level']) ?>"><?= \Yii::t('log', $row['level']) ?></span></td>
  49. </tr>
  50. <?php } ?>
  51. </tbody></table>
  52. </div><!-- /.box-body -->
  53. </div>