aboutsummaryrefslogtreecommitdiffstats
path: root/ui/imports/ui/components/dashboard/dashboard.html
blob: 57813748a4575d97c04d89e9d35c92db106df42c (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!-- 
########################################################################################
# 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="Dashboard">

  <div class="flex-box">
    
    <div class="flex-box-1 site-sidenav-collapse">
      <i class="material-icons">menu</i>
    </div>

    <div class="flex-box-3 main-layout-no-nav">
      
      <!-- this flex box separate environment cards from alerts -->
      <div class="flex-box ">
        
        <!-- this flex box for environment cards -->
        <div class="flex-box-3 flex-box flex-col">
          {{#each envItem in envList}}
            <div class="cards-flex-col-h500 white flex-box-1 ">
              <div class="flex-box justify-content-between">
                <div class="flex-box-1">
                  <i class="material-icons">view_carousel</i>
                </div>
                <div class="flex-box-3">
                  <h3>Enviroment name: {{ envItem.name }}</h3>
                  <table class="table table-striped">
                    <tbody>
                      <tr>
                        <th>Distribution</th>
                        <td> {{ envItem.distribution }} </td>
                      </tr>
                      <tr>
                        <th>Number of regions: {{ regoinsCount (envItem.name) }}</th>
                        <td>
                            <div class="dropdown">
                                <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                                    Select region from dropdown
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                                    {{#each regionItem in regoins (envItem.name) }}
                                      <li>
                                        <a href="{{pathFor route='environment' 
                                            data=(asHash _id=(idToStr envItem._id))
                                            query=(asHash 
                                              selectedNodeId=(idToStr regionItem._id ) ) }}"
                                              >{{ regionItem.object_name }}</a>
                                      </li>
                                    {{/each}}
                                </ul>
                            </div>
                        </td>
                      </tr>
                      <tr>
                        <th>Number of projects: {{ projectsCount (envItem.name) }}</th>
                        <td>
                            <div class="dropdown">
                                <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                                    Select project from dropdown
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                                  {{#each projectItem in projects (envItem.name) }}
                                  <li>
                                    <a href="{{pathFor route='environment' 
                                         data=(asHash _id=(idToStr envItem._id)) 
                                         query=(asHash selectedNodeId=(idToStr projectItem._id)) }}"
                                       >{{ projectItem.object_name }}</a>
                                  </li>
                                  {{/each}}
                                </ul>
                            </div>

                        </td>
                      </tr>
                    </tbody>
                  </table>
                  <h5>Enviroment summary:</h5>
                  <div class="flex-box justify-content-around">
                    <div class="cards-w300-h60 white blue-text flex-box-1">
                      <div class="flex-box ">
                        <div class="flex-box-1">
                          <i class="fa fa-desktop"></i>
                        </div>
                        <div class="flex-box-3">
                        <p>Number of instances {{ instancesCount (envItem.name)}}</p>
                        </div>
                      </div>
                    </div>
                    <div class="cards-w300-h60 white blue-text flex-box-1">
                      <div class="flex-box ">
                        <div class="flex-box-1">
                          <i class="fa fa-object-group"></i>
                        </div>
                        <div class="flex-box-3">
                        <p>Number of vServices {{ vservicesCount (envItem.name) }}</p>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="flex-box justify-content-around">
                    <div class="cards-w300-h60 white blue-text flex-box-1">
                      <div class="flex-box ">
                        <div class="flex-box-1">
                          <i class="fa fa-compress"></i>
                        </div>
                        <div class="flex-box-3">
                        <p>Number of vConnectors {{ vconnectorsCount (envItem.name) }}</p>
                        </div>
                      </div>
                    </div>
                    <div class="cards-w300-h60 white blue-text flex-box-1">
                      <div class="flex-box ">
                        <div class="flex-box-1">
                          <i class="fa fa-server" aria-hidden="true"></i>
                        </div>
                        <div class="flex-box-3">
                        <p>Number of hosts {{ hostsCount (envItem.name) }}</p>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
        {{/each}} <!-- envItem in envList -->

        </div> <!-- flex box for environment cards -->
        
        <!-- this flex box for alerts cards -->
        <div class="flex-box-1 flex-box flex-col ">

          <div class="sm-messages-section">
            {{#each messagesInfoBox in (getListMessagesInfoBox) }}
          <div class="sm-message-box">
              {{> MessagesInfoBox (argsMessagesInfoBox messagesInfoBox 
                    (messageCount messagesInfoBox.level)) }}
          </div>
            {{/each }}
          </div>

        </div> <!-- flex box for alerts cards -->

      </div>

    </div> <!-- main-layout -->
  </div>

</template>