summaryrefslogtreecommitdiffstats
path: root/rulemgt-frontend
diff options
context:
space:
mode:
authorGuangrongFu <fu.guangrong@zte.com.cn>2018-07-30 11:06:58 +0800
committerGuangrongFu <fu.guangrong@zte.com.cn>2018-07-30 11:06:58 +0800
commit0a6e32dbdb5d505536d33a3539f7b9fcfba1cffe (patch)
treea0684da6261bd8e0e3897203ca4efaff4d4da088 /rulemgt-frontend
parentfb0d4ea03ce4150861d921ba96cf0d3466491bca (diff)
Added Menu Items
Change-Id: Iab5d4c3be6e3db846bb0077221ec7d7ecbeb0315 Issue-ID: HOLMES-150 Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'rulemgt-frontend')
-rw-r--r--rulemgt-frontend/assembly.xml7
-rw-r--r--rulemgt-frontend/karma.conf.js2
-rw-r--r--rulemgt-frontend/package-lock.json2
-rw-r--r--rulemgt-frontend/src/app/app.component.ts4
-rw-r--r--rulemgt-frontend/src/app/app.module.ts2
-rw-r--r--rulemgt-frontend/src/app/app.routing.ts16
-rw-r--r--rulemgt-frontend/src/app/correlation-modal/modal.component.html2
-rw-r--r--rulemgt-frontend/src/app/correlation-modal/modal.component.ts2
-rw-r--r--rulemgt-frontend/src/app/correlation-modal/modal.service.ts2
-rw-r--r--rulemgt-frontend/src/app/correlation-modal/msg.ts2
-rw-r--r--rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html2
-rw-r--r--rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts2
-rw-r--r--rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.html4
-rw-r--r--rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts2
-rw-r--r--rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts2
-rw-r--r--rulemgt-frontend/src/app/correlation-ruleList/alarmRule.ts2
-rw-r--r--rulemgt-frontend/src/app/correlation-ruleList/ruleRequest.ts2
-rw-r--r--rulemgt-frontend/src/app/pages/remote.component.html5
-rw-r--r--rulemgt-frontend/src/assets/images/logo.pngbin0 -> 4762 bytes
-rw-r--r--rulemgt-frontend/src/default.html47
-rw-r--r--rulemgt-frontend/src/index.html3
-rw-r--r--rulemgt-frontend/src/main.ts2
-rw-r--r--rulemgt-frontend/src/polyfills.ts2
23 files changed, 66 insertions, 50 deletions
diff --git a/rulemgt-frontend/assembly.xml b/rulemgt-frontend/assembly.xml
index bf9a73e..9a4a65d 100644
--- a/rulemgt-frontend/assembly.xml
+++ b/rulemgt-frontend/assembly.xml
@@ -11,6 +11,13 @@
<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>
diff --git a/rulemgt-frontend/karma.conf.js b/rulemgt-frontend/karma.conf.js
index 37c5952..9f3bb5e 100644
--- a/rulemgt-frontend/karma.conf.js
+++ b/rulemgt-frontend/karma.conf.js
@@ -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.
diff --git a/rulemgt-frontend/package-lock.json b/rulemgt-frontend/package-lock.json
index 1c29b4d..ac2cffe 100644
--- a/rulemgt-frontend/package-lock.json
+++ b/rulemgt-frontend/package-lock.json
@@ -1,5 +1,5 @@
{
- "name": "alarm-analysis",
+ "name": "holmes",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
diff --git a/rulemgt-frontend/src/app/app.component.ts b/rulemgt-frontend/src/app/app.component.ts
index aa1b236..29bf86b 100644
--- a/rulemgt-frontend/src/app/app.component.ts
+++ b/rulemgt-frontend/src/app/app.component.ts
@@ -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) { }
diff --git a/rulemgt-frontend/src/app/app.module.ts b/rulemgt-frontend/src/app/app.module.ts
index 670c9b3..47977e6 100644
--- a/rulemgt-frontend/src/app/app.module.ts
+++ b/rulemgt-frontend/src/app/app.module.ts
@@ -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.
diff --git a/rulemgt-frontend/src/app/app.routing.ts b/rulemgt-frontend/src/app/app.routing.ts
index 3502167..649053b 100644
--- a/rulemgt-frontend/src/app/app.routing.ts
+++ b/rulemgt-frontend/src/app/app.routing.ts
@@ -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,14 +13,14 @@
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 });
diff --git a/rulemgt-frontend/src/app/correlation-modal/modal.component.html b/rulemgt-frontend/src/app/correlation-modal/modal.component.html
index 16f61e8..cc1cb2c 100644
--- a/rulemgt-frontend/src/app/correlation-modal/modal.component.html
+++ b/rulemgt-frontend/src/app/correlation-modal/modal.component.html
@@ -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.
diff --git a/rulemgt-frontend/src/app/correlation-modal/modal.component.ts b/rulemgt-frontend/src/app/correlation-modal/modal.component.ts
index 8fff7cd..cafb8e5 100644
--- a/rulemgt-frontend/src/app/correlation-modal/modal.component.ts
+++ b/rulemgt-frontend/src/app/correlation-modal/modal.component.ts
@@ -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.
diff --git a/rulemgt-frontend/src/app/correlation-modal/modal.service.ts b/rulemgt-frontend/src/app/correlation-modal/modal.service.ts
index d851d52..11b4378 100644
--- a/rulemgt-frontend/src/app/correlation-modal/modal.service.ts
+++ b/rulemgt-frontend/src/app/correlation-modal/modal.service.ts
@@ -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.
diff --git a/rulemgt-frontend/src/app/correlation-modal/msg.ts b/rulemgt-frontend/src/app/correlation-modal/msg.ts
index 8608dc1..55151a4 100644
--- a/rulemgt-frontend/src/app/correlation-modal/msg.ts
+++ b/rulemgt-frontend/src/app/correlation-modal/msg.ts
@@ -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.
diff --git a/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html b/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html
index 6378429..f5158b9 100644
--- a/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html
+++ b/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.html
@@ -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.
diff --git a/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts b/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts
index 36d721c..56376df 100644
--- a/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts
+++ b/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts
@@ -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.
diff --git a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.html b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.html
index 6e03db3..01b7f12 100644
--- a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.html
+++ b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.html
@@ -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">
diff --git a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts
index 65a5296..f6329f5 100644
--- a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts
+++ b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.component.ts
@@ -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.
diff --git a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts
index 33ea713..d558041 100644
--- a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts
+++ b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.service.ts
@@ -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.
diff --git a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.ts b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.ts
index 9c36d30..92c45b5 100644
--- a/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.ts
+++ b/rulemgt-frontend/src/app/correlation-ruleList/alarmRule.ts
@@ -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.
diff --git a/rulemgt-frontend/src/app/correlation-ruleList/ruleRequest.ts b/rulemgt-frontend/src/app/correlation-ruleList/ruleRequest.ts
index 2719a90..065fe50 100644
--- a/rulemgt-frontend/src/app/correlation-ruleList/ruleRequest.ts
+++ b/rulemgt-frontend/src/app/correlation-ruleList/ruleRequest.ts
@@ -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.
diff --git a/rulemgt-frontend/src/app/pages/remote.component.html b/rulemgt-frontend/src/app/pages/remote.component.html
index 2b5c8c3..a3f64c8 100644
--- a/rulemgt-frontend/src/app/pages/remote.component.html
+++ b/rulemgt-frontend/src/app/pages/remote.component.html
@@ -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
index 0000000..1f47ed0
--- /dev/null
+++ b/rulemgt-frontend/src/assets/images/logo.png
Binary files differ
diff --git a/rulemgt-frontend/src/default.html b/rulemgt-frontend/src/default.html
index beab509..33280b7 100644
--- a/rulemgt-frontend/src/default.html
+++ b/rulemgt-frontend/src/default.html
@@ -17,10 +17,12 @@
<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 {
@@ -59,21 +61,20 @@
.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;
}
@@ -84,22 +85,22 @@
}
.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>
@@ -114,31 +115,41 @@
</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>
diff --git a/rulemgt-frontend/src/index.html b/rulemgt-frontend/src/index.html
index c8da64f..5331b5e 100644
--- a/rulemgt-frontend/src/index.html
+++ b/rulemgt-frontend/src/index.html
@@ -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>
diff --git a/rulemgt-frontend/src/main.ts b/rulemgt-frontend/src/main.ts
index ac36dfe..028eb6d 100644
--- a/rulemgt-frontend/src/main.ts
+++ b/rulemgt-frontend/src/main.ts
@@ -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.
diff --git a/rulemgt-frontend/src/polyfills.ts b/rulemgt-frontend/src/polyfills.ts
index ed349af..d8d80f8 100644
--- a/rulemgt-frontend/src/polyfills.ts
+++ b/rulemgt-frontend/src/polyfills.ts
@@ -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.