From d0f5347dc16b5aa9fc95eb520fbc9a1c7b672b09 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Thu, 22 Aug 2019 16:55:57 +0800 Subject: feat: change the project structure and add mock data function Change-Id: I381845bff5eb37d1fab3eba8cf1ae7838df523b7 Issue-ID: USECASEUI-307 Signed-off-by: cyuamber --- .../app/components/details/details.component.css | 104 ------------------- .../app/components/details/details.component.html | 68 ------------- .../app/components/details/details.component.less | 111 --------------------- .../components/details/details.component.spec.ts | 25 ----- .../app/components/details/details.component.ts | 59 ----------- 5 files changed, 367 deletions(-) delete mode 100644 usecaseui-portal/src/app/components/details/details.component.css delete mode 100644 usecaseui-portal/src/app/components/details/details.component.html delete mode 100644 usecaseui-portal/src/app/components/details/details.component.less delete mode 100644 usecaseui-portal/src/app/components/details/details.component.spec.ts delete mode 100644 usecaseui-portal/src/app/components/details/details.component.ts (limited to 'usecaseui-portal/src/app/components/details') diff --git a/usecaseui-portal/src/app/components/details/details.component.css b/usecaseui-portal/src/app/components/details/details.component.css deleted file mode 100644 index 0b5493d7..00000000 --- a/usecaseui-portal/src/app/components/details/details.component.css +++ /dev/null @@ -1,104 +0,0 @@ -/* - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -.content .header { - background-color: #fff; - border-radius: 5px; - padding: 30px 28px 0; - position: relative; - margin-bottom: 30px; - border: 1px solid #e4e4e4; -} -.content .header hr { - margin: 0; - border: none; - height: 1px; - background-color: #e4e4e4; -} -.content .header h2 { - font: 700 24px/18px 'Times New Roman'; - color: #3fa8eb; - text-align: center; - margin-bottom: 27px; -} -.content .header span.tildeimg { - position: absolute; - left: 50%; - top: 71px; - width: 60px; - height: 10px; - transform: translate(-30px, 0); - background: url(../../../assets/images/tildeimg.png) no-repeat center center; - background-color: #fff; -} -.content .header .headerlist { - display: flex; -} -.content .header .headerlist div { - width: 100%; -} -.content .header .headerlist div p { - font: 400 14px 'Arial'; - color: #323437; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - margin: 18px 0 15px; -} -.content .header .headerlist div p span { - display: inline-block; - width: 50%; - text-align: right; - font: 700 14px 'Arial'; - color: #3fa8eb; -} -.content hr { - margin: 0; - border: none; - height: 1px; - background-color: #e4e4e4; -} -.content button { - width: 88px; - height: 22px; - position: absolute; - left: 50%; - transform: translate(-44px, 0); - border: none; - outline: none; - cursor: pointer; - background-color: #fff; - background: url(../../../assets/images/open-close2.png) no-repeat center -22px; -} -.content button:hover { - background: url(../../../assets/images/open-close2.png) no-repeat center -66px; -} -.content .buttonActive { - transform: translate(-44px, -22px); - background: url(../../../assets/images/open-close2.png) no-repeat center 0px; -} -.content .buttonActive:hover { - background: url(../../../assets/images/open-close2.png) no-repeat center -44px; -} -.content h2.detailtitle { - font: 700 24px/18px 'Times New Roman'; - color: #3fa8eb; - text-align: center; - margin-bottom: 15px; - padding-top: 25px; -} -.content .detailInformatioin { - overflow: hidden; -} diff --git a/usecaseui-portal/src/app/components/details/details.component.html b/usecaseui-portal/src/app/components/details/details.component.html deleted file mode 100644 index 62770b60..00000000 --- a/usecaseui-portal/src/app/components/details/details.component.html +++ /dev/null @@ -1,68 +0,0 @@ - -
-
-

HEADER INFORMATION

-
-
-
-

Version :{{datailheaderdata.version}}

-

Domain :{{datailheaderdata.domain}}

-

Event Name :{{datailheaderdata.eventName}}

-

Event Id :{{datailheaderdata.eventId}}

-

EventType :{{datailheaderdata.eventType}}

-

NfcNamingCode :{{datailheaderdata.nfcNamingCode}}

-

NfNamingCode :{{datailheaderdata.nfNamingCode}}

-

SourceName :{{datailheaderdata.sourceName}}

-

SourceId :{{datailheaderdata.sourceId}}

-

ReportingEntityName :{{datailheaderdata.reportingEntityName}}

-

ReportingEntityId :{{datailheaderdata.reportingEntityId}}

-
-
-

Priority :{{datailheaderdata.priority}}

-

ReportTime :{{datailheaderdata.reportTime}}

-

ClearTime :{{datailheaderdata.clearTime}}

-

FaultFieldsVersion :{{datailheaderdata.faultFieldsVersion}}

-

Event Servrity :{{datailheaderdata.eventServrity}}

-

EventSourceType :{{datailheaderdata.eventSourceType}}

-

EventCategory :{{datailheaderdata.eventCategory}}

-

AlarmCondition :{{datailheaderdata.alarmCondition}}

-

SpecificProblem :{{datailheaderdata.specificProblem}}

-

Status : {{datailheaderdata.status}}

-

AlarmInterfaceA :{{datailheaderdata.alarmInterfaceA}}

-
-
-
-
- -

DETAIL INFORMATION

-
- - - - Item Name - Item Value - - - - - {{data.name}} - {{data.value}} - - - -
-
diff --git a/usecaseui-portal/src/app/components/details/details.component.less b/usecaseui-portal/src/app/components/details/details.component.less deleted file mode 100644 index a27357ef..00000000 --- a/usecaseui-portal/src/app/components/details/details.component.less +++ /dev/null @@ -1,111 +0,0 @@ - -/* - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -.content { - .header { - background-color: #fff; - border-radius: 5px; - padding: 30px 28px 0; - position: relative; - margin-bottom: 30px; - border: 1px solid #e4e4e4; - hr { - margin: 0; - border: none; - height: 1px; - background-color: #e4e4e4; - } - h2 { - font: 700 24px/18px 'Times New Roman'; - color: #3fa8eb; - text-align: center; - margin-bottom: 27px; - } - span.tildeimg { - position: absolute; - left: 50%; - top: 71px; - width: 60px; - height: 10px; - transform: translate(-30px,0); - background: url(../../../assets/images/tildeimg.png) no-repeat center center; - background-color: #fff; - } - .headerlist { - display: flex; - div { - width: 100%; - p { - font: 400 14px 'Arial'; - color: #323437; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - margin: 18px 0 15px; - span { - display: inline-block; - width: 50%; - text-align: right; - font: 700 14px 'Arial'; - color: #3fa8eb; - } - } - } - } - } - hr { - margin: 0; - border: none; - height: 1px; - background-color: #e4e4e4; - } - button { - width: 88px; - height: 22px; - position: absolute; - left: 50%; - transform: translate(-44px,0); - border: none; - outline: none; - cursor: pointer; - background-color: #fff; - background: url(../../../assets/images/open-close2.png) no-repeat center -22px; - &:hover { - background: url(../../../assets/images/open-close2.png) no-repeat center -66px; - } - } - .buttonActive { - transform: translate(-44px,-22px); - background: url(../../../assets/images/open-close2.png) no-repeat center -0px; - &:hover { - background: url(../../../assets/images/open-close2.png) no-repeat center -44px; - } - } - h2.detailtitle { - font: 700 24px/18px 'Times New Roman'; - color: #3fa8eb; - text-align: center; - margin-bottom: 15px; - padding-top: 25px; - } - .detailInformatioin { - // transition: all 0.3s linear; - overflow: hidden; - } - .detailshow { - - } -} \ No newline at end of file diff --git a/usecaseui-portal/src/app/components/details/details.component.spec.ts b/usecaseui-portal/src/app/components/details/details.component.spec.ts deleted file mode 100644 index 1d5cbeb8..00000000 --- a/usecaseui-portal/src/app/components/details/details.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { DetailsComponent } from './details.component'; - -describe('DetailsComponent', () => { - let component: DetailsComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ DetailsComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(DetailsComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/usecaseui-portal/src/app/components/details/details.component.ts b/usecaseui-portal/src/app/components/details/details.component.ts deleted file mode 100644 index 5eed3daf..00000000 --- a/usecaseui-portal/src/app/components/details/details.component.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2019 CMCC, Inc. and others. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -import { Component, OnInit, Input } from '@angular/core'; -import { slideUpDown } from '../../animates'; -import { HomesService } from '../../homes.service'; - -@Component({ - selector: 'app-details', - templateUrl: './details.component.html', - styleUrls: ['./details.component.less'], - animations: [ slideUpDown ] -}) -export class DetailsComponent implements OnInit { - - constructor(private myhttp:HomesService) { } - - ngOnInit() { - } - - ngOnChanges(changes){ - this.getAlarmDetailData(this.detailId); - } - - datailheaderdata: any = { - - }; - dataillistdata: any = []; - getAlarmDetailData(id){ - if(id){ - this.myhttp.getAlarmDetailData(id).subscribe((data)=>{ - this.datailheaderdata = data.alarmsHeader; - this.dataillistdata = data.list; - }) - } - - } - // detail Show - moredetailShow = false; - @Input() detailId; - - state = 'up' - slideUpDown(){ - this.moredetailShow = !this.moredetailShow; - this.state = this.state === 'up' ? 'down' : 'up'; - } -} -- cgit 1.2.3-korg