aboutsummaryrefslogtreecommitdiffstats
path: root/ui/imports/ui/components/messages-modal/messages-modal.html
blob: 292bc20f9a1348166d0094daad8bfb0920a707fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!-- 
########################################################################################
# Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) and others #
#                                                                                      #
# All rights reserved. This program and the accompanying materials                     #
# are made available under the terms of the Apache License, Version 2.0                #
# which accompanies this distribution, and is available at                             #
# http://www.apache.org/licenses/LICENSE-2.0                                           #
########################################################################################
 -->
<template name="MessagesModal">
<div class="os-messages-modal modal fade" 
  id="messagesModalGlobal" 
  tabindex="-1" 
  role="dialog" 
  aria-labelledby="myModalLabel"
  >
    <div class="modal-dialog" 
      role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label
                        ="Close"><span aria-hidden="true">&times;</span></button>
                <i class="material-icons">{{ iconType }}</i>
            </div>

            <div class="modal-body">
                <div class="sm-general-table-section">

                  <h5 class="modal-title" id="myModalLabel"
                                          >{{ listHeader }}</h5>
                  <table class="table table-striped sm-messages-table">
                      <thead class="sm-message-table-section">
                      <tr>
                          <th>Environment</th>
                          <th>Display Context</th>
                          <th>Source System</th>
                          <th>Timestamp</th>
                          <th>Related Object</th>
                      </tr>
                      </thead>
                      <tbody class="sm-message-table-section">
                      {{#each message in messages }}
                        <tr class="sm-message-row">
                          <td>{{ message.environment }}</td>
                          <td>
                            <a class="cl-link sm-display-context-link" 
                               data-env-name="{{ message.environment }}"
                               data-item-id="{{ message.display_context }}">Link</a>
                          </td>
                          <td>{{ message.source_system }}</td>
                          <td>{{ message.timestamp }}</td>
                          <td>
                            {{#if message.related_object }}
                              {{> InventoryPropertiesDisplay (argsInvPropDisplay message.environment message.related_object) }}
                            {{/if }}
                          </td>
                        </tr>
                      {{/each}}
                      </tbody>
                  </table>
                </div>

                <div class="sm-pager-section">
                  {{> Pager (argsPager currentPage amountPerPage totalMessages) }}
                </div>

            </div>

            <div class="modal-footer">
                <button type="button" 
                  class="mdl-button mdl-js-button" 
                  data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
</template>