read rule manager common component include main,routing,module and other content
Issue-ID:CLIENT-164
Change-Id: I1cc0a218cf97a379a53d2faaacec37977b56a92c
Signed-off-by: YILI <li.yi101@zte.com.cn>
--- /dev/null
+/*\r
+ Copyright 2017 ZTE Corporation.\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+*/\r
+import { Component,OnInit } from '@angular/core';\r
+import {TranslateService} from 'ng2-translate';\r
+@Component({\r
+ selector: 'remote-config',\r
+ templateUrl: './pages/remote.component.html',\r
+})\r
+export class AppComponent implements OnInit{\r
+ constructor(private translate:TranslateService){}\r
+ getLanguage():string{\r
+ let rtnLanguage = localStorage.getItem("language-option");\r
+ if( rtnLanguage == "null" || rtnLanguage == null ){\r
+ rtnLanguage =window.navigator.language;\r
+ }\r
+ if( rtnLanguage.startsWith('en') ){\r
+ return "en-US";\r
+ }\r
+ return rtnLanguage;\r
+ }\r
+\r
+ ngOnInit():void {\r
+ this.translate.addLangs(["en", "zh"]);\r
+ this.translate.setDefaultLang('zh');\r
+ let language = this.getLanguage();\r
+ this.translate.use(language);\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+/*\r
+ Copyright 2017 ZTE Corporation.\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+*/\r
+import { NgModule } from '@angular/core';\r
+import { BrowserModule } from '@angular/platform-browser';\r
+import { FormsModule } from '@angular/forms';\r
+import {routing} from "./app.routing";\r
+import {AppComponent} from "./app.component";\r
+import {AlarmRule} from "./correlation-ruleList/alarmRule.component";\r
+import {RuleInfo} from "./correlation-ruleInfo/ruleInfo.component";\r
+import {ModalService} from "./correlation-modal/modal.service";\r
+import {HttpModule,Jsonp} from '@angular/http';\r
+import {AlarmRuleService} from './correlation-ruleList/alarmRule.service';\r
+import {TranslateModule} from "ng2-translate";\r
+import {SifModalComponent} from './correlation-modal/modal.component'\r
+import {TestBed,ComponentFixture} from '@angular/core/testing';\r
+@NgModule({\r
+ imports: [\r
+ BrowserModule,\r
+ FormsModule,\r
+ HttpModule,\r
+ routing,\r
+ TranslateModule.forRoot()\r
+\r
+ ],\r
+ declarations: [\r
+ AppComponent,\r
+ AlarmRule,\r
+ RuleInfo,\r
+ SifModalComponent,\r
+ TestBed,\r
+ ComponentFixture\r
+ ],\r
+ providers:[ModalService,AlarmRuleService,Jsonp],\r
+ bootstrap: [AppComponent]\r
+})\r
+export class AppModule { }\r
+\r
--- /dev/null
+/*\r
+ Copyright 2017 ZTE Corporation.\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+*/\r
+import { ModuleWithProviders } from '@angular/core';\r
+import { Routes, RouterModule } from '@angular/router';\r
+import {AlarmRule} from './correlation-ruleList/alarmRule.component';\r
+import {RuleInfo} from './correlation-ruleInfo/ruleInfo.component'\r
+const appRoutes: Routes = [\r
+ {\r
+ path: 'alarmRule',\r
+ component:AlarmRule\r
+ },\r
+ {\r
+ path: 'ruleInfo',\r
+ component: RuleInfo\r
+ },\r
+ {\r
+ path: 'ruleInfo/:id',\r
+ component: RuleInfo\r
+ },\r
+ {\r
+ path:'',\r
+ redirectTo:'alarmRule',\r
+ pathMatch: 'full'\r
+ },\r
+\r
+];\r
+export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);\r
--- /dev/null
+/*\r
+ Copyright 2017 ZTE Corporation.\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+*/\r
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r
+import { AppModule } from './app.module';\r
+const platform = platformBrowserDynamic();\r
+platform.bootstrapModule(AppModule);
\ No newline at end of file
--- /dev/null
+<!--\r
+ Copyright 2017 ZTE Corporation.\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+-->\r
+<div class="tabzone">\r
+</div>\r
+<sif-modal></sif-modal>\r
+<router-outlet></router-outlet>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>\r
+<html>\r
+<head>\r
+ <base href="/iui/LY-Correlation/">\r
+ <meta charset="UTF-8">\r
+ <meta name="viewport" content="width=device-width, initial-scale=1">\r
+ <script src="public/component/thirdparty/jquery/jquery-1.10.2.min.js"></script>\r
+ <script src="public/common/js/popModal.js"></script>\r
+ <script src="public/common/js/jQuery-File-Upload/js/vendor/jquery.ui.widget.js"></script>\r
+ <script src="public/common/js/jQuery-File-Upload/js/jquery.iframe-transport.js"></script>\r
+ <script src="public/common/js/jQuery-File-Upload/js/jquery.fileupload.js"></script>\r
+<body style="overflow: auto">\r
+<remote-config>Loading...</remote-config>\r
+\r
+</body>\r
+</html>\r
--- /dev/null
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r
+import { enableProdMode } from '@angular/core';\r
+import { AppModule } from './app/app.module';\r
+if (process.env.ENV === 'production') {\r
+ enableProdMode();\r
+}\r
+platformBrowserDynamic().bootstrapModule(AppModule);\r
--- /dev/null
+import 'core-js/es6';\r
+import 'core-js/es7/reflect';\r
+require('zone.js/dist/zone');\r
+if (process.env.ENV === 'production') {\r
+} else {\r
+ Error['stackTraceLimit'] = Infinity;\r
+ require('zone.js/dist/long-stack-trace-zone');\r
+}\r
--- /dev/null
+import '@angular/platform-browser';
+import '@angular/platform-browser-dynamic';
+import '@angular/core';
+import '@angular/common';
+import '@angular/http';
+import '@angular/router';
+import 'angular-in-memory-web-api';
+import 'rxjs';
+
+
+import '../public/thirdparty/css/bootstrap.min.css';
+import '../public/thirdparty/css/magic-check.css';
+import '../public/thirdparty/css/zTreeStyle.css';
+import '../public/framework/browser/css/open-ostyle.css';
+import '../public/css/alarm-rule.css'
+
+import '../public/thirdparty/js/bootstrap.min.js';
+import '../public/thirdparty/js/bootstrap-table.min.js';
+import '../public/thirdparty/js/bootstrap-table-filter-control.min.js';
+import '../public/thirdparty/js/jquery.ztree.core-3.5.js';
+import '../public/thirdparty/js/jquery_1.12.4.min.js';
+import '../public/thirdparty/js/mustache.js';
+
+
+import '../public/common/css/popModal.css';
+import '../public/common/css/fileupload.css';
+import '../public/common/js/jQuery-File-Upload/css/jquery.fileupload.css';
+
+import '../public/common/js/jQuery-File-Upload/js/jquery.fileupload.js';
+import '../public/common/js/popModal.js';