Added Menu Items 59/57959/1
authorGuangrongFu <fu.guangrong@zte.com.cn>
Mon, 30 Jul 2018 03:06:58 +0000 (11:06 +0800)
committerGuangrongFu <fu.guangrong@zte.com.cn>
Mon, 30 Jul 2018 03:06:58 +0000 (11:06 +0800)
Change-Id: Iab5d4c3be6e3db846bb0077221ec7d7ecbeb0315
Issue-ID: HOLMES-150
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
23 files changed:
rulemgt-frontend/assembly.xml
rulemgt-frontend/karma.conf.js
rulemgt-frontend/package-lock.json
rulemgt-frontend/src/app/app.component.ts
rulemgt-frontend/src/app/app.module.ts
rulemgt-frontend/src/app/app.routing.ts
rulemgt-frontend/src/app/correlation-modal/modal.component.html
rulemgt-frontend/src/app/correlation-modal/modal.component.ts
rulemgt-frontend/src/app/correlation-modal/modal.service.ts
rulemgt-frontend/src/app/correlation-modal/msg.ts
rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html
rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts
rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.html
rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts
rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts
rulemgt-frontend/src/app/correlation-ruleList/alarmRule.ts
rulemgt-frontend/src/app/correlation-ruleList/ruleRequest.ts
rulemgt-frontend/src/app/pages/remote.component.html
rulemgt-frontend/src/assets/images/logo.png [new file with mode: 0644]
rulemgt-frontend/src/default.html
rulemgt-frontend/src/index.html
rulemgt-frontend/src/main.ts
rulemgt-frontend/src/polyfills.ts

index bf9a73e..9a4a65d 100644 (file)
       <directory>dist</directory>
       <outputDirectory>/iui/holmes</outputDirectory>
     </fileSet>
+    <fileSet>
+      <directory>src</directory>
+      <outputDirectory>/iui/holmes</outputDirectory>
+      <includes>
+        <include>default.html</include>
+      </includes>
+    </fileSet>
   </fileSets>
 </assembly>
 
index 37c5952..9f3bb5e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2017 ZTE Corporation.
+/* Copyright 2018 ZTE Corporation.
  *
  *Licensed under the Apache License, Version 2.0 (the "License");
  *you may not use this file except in compliance with the License.
index 1c29b4d..ac2cffe 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "name": "alarm-analysis",
+  "name": "holmes",
   "version": "1.0.0",
   "lockfileVersion": 1,
   "requires": true,
index aa1b236..29bf86b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ import { TranslateService } from '@ngx-translate/core';
 
 @Component({
     selector: 'remote-config',
-    templateUrl: './pages/remote.component.html',
+    templateUrl: './pages/remote.component.html'
 })
 export class AppComponent implements OnInit {
     constructor(private translate: TranslateService) { }
index 670c9b3..47977e6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
index 3502167..649053b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  See the License for the specific language governing permissions and
  limitations under the License.
 */
-import { ModuleWithProviders }  from '@angular/core';
+import { ModuleWithProviders } from '@angular/core';
 import { Routes, RouterModule } from '@angular/router';
-import {AlarmRule} from './correlation-ruleList/alarmRule.component';
-import {RuleInfo} from './correlation-ruleInfo/ruleInfo.component'
+import { AlarmRule } from './correlation-ruleList/alarmRule.component';
+import { RuleInfo } from './correlation-ruleInfo/ruleInfo.component';
 const appRoutes: Routes = [
     {
         path: 'alarmRule',
-        component:AlarmRule
+        component: AlarmRule
     },
     {
         path: 'ruleInfo',
@@ -31,10 +31,10 @@ const appRoutes: Routes = [
         component: RuleInfo
     },
     {
-        path:'',
-        redirectTo:'alarmRule',
+        path: '',
+        redirectTo: 'alarmRule',
         pathMatch: 'full'
     },
 
 ];
-export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes,{ useHash: true });
+export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, { useHash: true });
index 16f61e8..cc1cb2c 100644 (file)
@@ -1,5 +1,5 @@
 <!--
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
index 8fff7cd..cafb8e5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
index d851d52..11b4378 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
index 8608dc1..55151a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
index 6378429..f5158b9 100644 (file)
@@ -1,5 +1,5 @@
 <!--
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
index 36d721c..56376df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the 'License');
  you may not use this file except in compliance with the License.
index 6e03db3..01b7f12 100644 (file)
@@ -1,5 +1,5 @@
 <!--
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<div class="container" style="margin-top: 20px">
+<div class="container-fluid" style="padding-top: 20px">
     <form class="form-inline">
         <div class="form-body">
             <div class="row form-group col-xs-12">
index 65a5296..f6329f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
index 33ea713..d558041 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
index 9c36d30..92c45b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
index 2719a90..065fe50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
index 2b5c8c3..a3f64c8 100644 (file)
@@ -1,5 +1,5 @@
 <!--
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<div class="tabzone">
-</div>
+<div class="tabzone"></div>
 <sif-modal></sif-modal>
 <router-outlet></router-outlet>
\ No newline at end of file
diff --git a/rulemgt-frontend/src/assets/images/logo.png b/rulemgt-frontend/src/assets/images/logo.png
new file mode 100644 (file)
index 0000000..1f47ed0
Binary files /dev/null and b/rulemgt-frontend/src/assets/images/logo.png differ
index beab509..33280b7 100644 (file)
 <html>
 
 <head>
-    <!-- <base href=""> -->
+    <base href="/iui/holmes/">
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <script src="./assets/thirdparty/js/jquery_1.12.4.min.js"></script>
+    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ"
+        crossorigin="anonymous">
 
     <style type="text/css">
         .header {
 
         .body {
             min-height: 500px;
-            height: 500px;
             padding: 0;
         }
 
         body {
             margin: 0;
-            overflow: auto;
         }
 
         iframe {
             margin: 0;
+            border: none;
         }
 
         .menu-item {
-            height: 135px;
+            height: 120px;
             color: #aaa;
             text-align: center;
         }
         }
 
         .menu-item-title {
-            height: 50px;
-            line-height: 50px;
+            height: 45px;
+            line-height: 25px;
             font-family: Arial, Helvetica, sans-serif;
             font-weight: bold;
         }
 
         .menu-icon {
-            height: 85px;
-            line-height: 85px;
+            height: 75px;
+            line-height: 90px;
+            font-size: 35px;
         }
 
         .active {
             color: #FFF;
             background-color: #424e57;
         }
-
     </style>
 </head>
 
     </div>
     <div class="body">
         <div class="sidebar fl">
-            <div class="menu-item active">
+            <div class="menu-item active" id="rule-mgmt">
                 <div class="menu-icon">
-                    icon
+                    <i class="fas fa-file-alt"></i>
                 </div>
                 <div class="menu-item-title">Rules</div>
             </div>
         </div>
         <div class="main fl">
-            <iframe src="/iui/holmes/index.html"></iframe>
+            <iframe src="/iui/holmes/#/alarmRule"></iframe>
         </div>
     </div>
 
     <script type="text/javascript">
+
+        var menus = {
+            "rule-mgmt": "/iui/holmes/#/alarmRule"
+        }
+
         function adjustSizes() {
-            var height = $(window).height() - $(".header").height();
-                $(".sidebar").height(height);
-                $("iframe").height(height);
-                $("iframe").width($(window).width() - $(".sidebar").width());
+            var height = $(window).height() - $(".header").outerHeight() - 4;
+            $(".sidebar").height(height);
+            $("iframe").height(height);
+            $(".main").height(height);
+            $("iframe").width($(window).width() - $(".sidebar").width());
         }
 
-        $(function(){
-            $(window).on("resize", function(){
+        $(function () {
+            $(window).on("resize", function () {
                 adjustSizes();
             });
             adjustSizes();
+
+            $(".menu-item").on("click", function () {
+                $("iframe")[0].src = menus[$(this).attr("id")];
+            })
         });
     </script>
 </body>
index c8da64f..5331b5e 100644 (file)
@@ -1,5 +1,5 @@
 <!--
- Copyright 2017 ZTE Corporation.
+ Copyright 2018 ZTE Corporation.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
@@ -30,5 +30,4 @@
     <body style="overflow: auto">
         <remote-config>Loading...</remote-config>
     </body>
-
 </html>
index ac36dfe..028eb6d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2017 ZTE Corporation.
+/* Copyright 2018 ZTE Corporation.
  *
  *Licensed under the Apache License, Version 2.0 (the "License");
  *you may not use this file except in compliance with the License.
index ed349af..d8d80f8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright 2017 ZTE Corporation.
+/* Copyright 2018 ZTE Corporation.
  *
  *Licensed under the Apache License, Version 2.0 (the "License");
  *you may not use this file except in compliance with the License.