Added Menu Items
[holmes/rule-management.git] / rulemgt-frontend / src / default.html
1 <!--
2  Copyright 2018 ZTE Corporation.
3
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8      http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 -->
16 <!DOCTYPE html>
17 <html>
18
19 <head>
20     <base href="/iui/holmes/">
21     <meta charset="UTF-8">
22     <meta name="viewport" content="width=device-width, initial-scale=1">
23     <script src="./assets/thirdparty/js/jquery_1.12.4.min.js"></script>
24     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ"
25         crossorigin="anonymous">
26
27     <style type="text/css">
28         .header {
29             height: 50px;
30             width: 100%;
31             background-color: #e0e0e0;
32             color: #333333;
33             padding-left: 20px;
34             padding-right: 20px;
35             border-bottom: 2px solid #d0d0d0d0;
36             padding: 0;
37         }
38
39         .header .title {
40             font-family: Arial, Helvetica, sans-serif;
41             font-weight: bold;
42             font-size: 20px;
43             padding-left: 25px;
44             padding-top: 17px;
45         }
46
47         .logo-img {
48             margin-top: 8px;
49         }
50
51         .fl {
52             float: left;
53         }
54
55         .sidebar {
56             height: 100%;
57             background-color: #4d5b69;
58             width: 135px;
59             display: table-cell;
60         }
61
62         .body {
63             min-height: 500px;
64             padding: 0;
65         }
66
67         body {
68             margin: 0;
69         }
70
71         iframe {
72             margin: 0;
73             border: none;
74         }
75
76         .menu-item {
77             height: 120px;
78             color: #aaa;
79             text-align: center;
80         }
81
82         .menu-item:hover {
83             color: #FFF;
84             background-color: rgba(255, 255, 255, 0.1);
85         }
86
87         .menu-item-title {
88             height: 45px;
89             line-height: 25px;
90             font-family: Arial, Helvetica, sans-serif;
91             font-weight: bold;
92         }
93
94         .menu-icon {
95             height: 75px;
96             line-height: 90px;
97             font-size: 35px;
98         }
99
100         .active {
101             color: #FFF;
102             background-color: #424e57;
103         }
104     </style>
105 </head>
106
107 <body>
108     <div class="header">
109         <div class="fl logo-img">
110             <img src="./assets/images/logo.png" alt="ONAP" />
111         </div>
112         <div class="fl title">
113             Holmes
114         </div>
115     </div>
116     <div class="body">
117         <div class="sidebar fl">
118             <div class="menu-item active" id="rule-mgmt">
119                 <div class="menu-icon">
120                     <i class="fas fa-file-alt"></i>
121                 </div>
122                 <div class="menu-item-title">Rules</div>
123             </div>
124         </div>
125         <div class="main fl">
126             <iframe src="/iui/holmes/#/alarmRule"></iframe>
127         </div>
128     </div>
129
130     <script type="text/javascript">
131
132         var menus = {
133             "rule-mgmt": "/iui/holmes/#/alarmRule"
134         }
135
136         function adjustSizes() {
137             var height = $(window).height() - $(".header").outerHeight() - 4;
138             $(".sidebar").height(height);
139             $("iframe").height(height);
140             $(".main").height(height);
141             $("iframe").width($(window).width() - $(".sidebar").width());
142         }
143
144         $(function () {
145             $(window).on("resize", function () {
146                 adjustSizes();
147             });
148             adjustSizes();
149
150             $(".menu-item").on("click", function () {
151                 $("iframe")[0].src = menus[$(this).attr("id")];
152             })
153         });
154     </script>
155 </body>
156
157 </html>