Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
smart
Commits
ce6139e0
Commit
ce6139e0
authored
Nov 29, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
bd4560ea
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
63 additions
and
30 deletions
+63
-30
alarm-set.component.ts
src/main/webapp/app/alarm/alarm-set/alarm-set.component.ts
+0
-1
alarm-target.component.ts
...pp/app/alarm/modal/alarm-target/alarm-target.component.ts
+0
-3
media-type.component.ts
...webapp/app/alarm/modal/media-type/media-type.component.ts
+0
-1
navbar.css
src/main/webapp/app/layouts/navbar/navbar.css
+2
-1
alarm-modal.component.ts
...ain/webapp/app/modal/alarm-modal/alarm-modal.component.ts
+0
-2
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+30
-1
ne-topology.component.ts
...bapp/app/netTopology/ne-topology/ne-topology.component.ts
+1
-1
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+6
-9
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+18
-4
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+1
-0
overAll.service.ts
src/main/webapp/app/overAll/overAll.service.ts
+5
-1
auth-jwt.service.ts
src/main/webapp/app/shared/auth/auth-jwt.service.ts
+0
-2
login.component.ts
src/main/webapp/app/shared/login/login.component.ts
+0
-1
login.service.ts
src/main/webapp/app/shared/login/login.service.ts
+0
-2
system.service.ts
src/main/webapp/app/system/system.service.ts
+0
-1
No files found.
src/main/webapp/app/alarm/alarm-set/alarm-set.component.ts
View file @
ce6139e0
...
...
@@ -102,7 +102,6 @@ export class AlarmSetComponent implements OnInit {
arr
=
res
;
}
});
console
.
log
(
arr
);
this
.
smartAlarmGroup
.
editModal
(
arr
);
}
...
...
src/main/webapp/app/alarm/modal/alarm-target/alarm-target.component.ts
View file @
ce6139e0
...
...
@@ -40,7 +40,6 @@ export class AlarmTargetComponent implements OnInit {
}
toNode
(
data
){
console
.
log
(
data
);
// const arr = this.toTree.listToTree(1,2,data)
this
.
nodes
=
data
.
map
(
res
=>
{
return
new
NzTreeNode
(
res
);
...
...
@@ -49,8 +48,6 @@ export class AlarmTargetComponent implements OnInit {
//下级
mouseAction
(
name
:
string
,
event
:
NzFormatEmitEvent
):
void
{
console
.
log
(
name
);
console
.
log
(
event
);
// if (name === 'expand') {
setTimeout
(
_
=>
{
// if (e.node.getChildren().length === 0 && e.node.isExpanded) {
...
...
src/main/webapp/app/alarm/modal/media-type/media-type.component.ts
View file @
ce6139e0
...
...
@@ -53,7 +53,6 @@ export class MediaTypeComponent implements OnInit {
this
.
alarmSer
.
getMediaType
(
this
.
mediatypeid
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
console
.
log
(
this
.
validateForm
.
value
.
type
);
const
data
=
res
.
data
[
0
];
data
.
type
+=
""
;
this
.
validateForm
.
patchValue
(
data
);
...
...
src/main/webapp/app/layouts/navbar/navbar.css
View file @
ce6139e0
...
...
@@ -87,7 +87,8 @@ Logo styles
}
.span-hov
{
overflow
:
hidden
;
display
:
inline-flex
;
display
:
-webkit-inline-flex
;
display
:
-moz-box
;
}
.addBtn
{
overflow
:
hidden
;
...
...
src/main/webapp/app/modal/alarm-modal/alarm-modal.component.ts
View file @
ce6139e0
...
...
@@ -101,8 +101,6 @@ export class AlarmModalComponent implements OnInit {
//下级
mouseAction
(
name
:
string
,
event
:
NzFormatEmitEvent
)
{
console
.
log
(
name
);
console
.
log
(
event
);
const
index
=
<
any
>
event
.
node
.
key
-
1
;
const
data
=
{
'groupids'
:
[
event
.
node
.
origin
.
groupid
],
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.ts
View file @
ce6139e0
import
{
Component
,
OnIni
t
,
ViewChild
}
from
'@angular/core'
;
import
{
Component
,
EventEmitter
,
OnInit
,
Outpu
t
,
ViewChild
}
from
'@angular/core'
;
import
{
OverAllService
}
from
'../../overAll/overAll.service'
;
import
{
FormBuilder
,
...
...
@@ -26,10 +26,12 @@ import {NewTypeComponent} from '../new-type/new-type.component';
export
class
BasiCheckComponent
implements
OnInit
{
@
ViewChild
(
'basicKey'
)
basicKey
:
BasicKeyComponent
;
@
ViewChild
(
'newType'
)
newType
:
NewTypeComponent
;
@
Output
()
done
=
new
EventEmitter
<
any
>
();
title
;
isCheck
=
false
;
hostId
;
//主机ID
itemId
;
//监控项id
interfaceList
:
any
[];
validateForm
;
checkList
;
//监测点分类
...
...
@@ -102,6 +104,7 @@ export class BasiCheckComponent implements OnInit {
this
.
title
=
"编辑监测点"
;
this
.
hostId
=
hostId
;
this
.
isCheck
=
true
;
this
.
itemId
=
id
;
this
.
overAllSer
.
findItemDetail
(
id
).
subscribe
(
(
res
)
=>
{
...
...
@@ -171,10 +174,36 @@ export class BasiCheckComponent implements OnInit {
data
.
faultCondition
=
this
.
validateForm
.
faultCondition_high
;
}
if
(
this
.
title
==
"添加监测点"
){
this
.
create
(
data
);
}
if
(
this
.
title
==
"编辑监测点"
){
this
.
update
(
data
);
}
}
create
(
data
){
this
.
overAllSer
.
create
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
isCheck
=
false
;
this
.
done
.
emit
();
}
this
.
message
.
info
(
res
.
errMsg
);
},
(
err
)
=>
{
this
.
message
.
info
(
'系统错误'
);
}
);
}
update
(
data
){
data
.
itemid
=
this
.
itemId
;
this
.
overAllSer
.
itemUpdata
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
isCheck
=
false
;
this
.
done
.
emit
();
}
this
.
message
.
info
(
res
.
errMsg
);
},
...
...
src/main/webapp/app/netTopology/ne-topology/ne-topology.component.ts
View file @
ce6139e0
...
...
@@ -60,7 +60,7 @@ export class NeTopologyComponent implements OnInit {
addTopo
()
{
this
.
topoType
=
'添加模式'
;
this
.
message
.
info
(
'添加模式'
);
editor
.
utils
.
clear
Topology
();
editor
.
utils
.
edit
Topology
();
}
//编辑拓扑图
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
ce6139e0
...
...
@@ -17,7 +17,6 @@
</nz-breadcrumb>
</div>
<div
nz-col
nzSpan=
"8"
class=
"text-right"
>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-sync"
></i></button>
<button
nz-button
nzType=
"primary"
><i
class=
"anticon anticon-arrows-alt"
></i></button>
</div>
...
...
@@ -28,8 +27,8 @@
<!--<button nz-button nzType="default">编辑</button>-->
<button
nz-button
nzType=
"default"
>
删除
</button>
</div>
<div
class=
"releative"
>
<div
class=
"checkTags tag-form"
>
<div
class=
"releative"
#
checkEle
>
<div
#
colorEle
class=
"checkTags tag-form"
>
<span>
<nz-tag
[
nzColor
]="
color
.
green
"
></nz-tag>
<i
*
ngIf=
"!checkStatus.normal && checkStatus.normal !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
{{checkStatus.normal}}
...
...
@@ -139,7 +138,7 @@
</div>
</section>
</nz-tab>
<nz-tab
nzTitle=
"监测点列表
"
>
<nz-tab
nzTitle=
"监测点列表
"
>
<div
nz-row
>
<div
class=
"padding-15-0"
>
<nz-radio-group
[(
ngModel
)]="
itemTypeValue
"
[
nzButtonStyle
]="'
solid
'"
>
...
...
@@ -173,8 +172,8 @@
<td
class=
"handle cursor"
>
<span
(
click
)="
showEditModal
(
data
)"
>
编辑
</span>
<span
(
click
)="
deleteCheckItem
(
data
)"
>
删除
</span>
<span
*
ngIf=
"data.
itemState
== 0"
(
click
)="
updateItem
(
data
.
itemid
,
1
)"
>
停止
</span>
<span
*
ngIf=
"data.
itemState
== 1"
(
click
)="
updateItem
(
data
.
itemid
,
0
)"
>
启用
</span>
<span
*
ngIf=
"data.
status
== 0"
(
click
)="
updateItem
(
data
.
itemid
,
1
)"
>
停止
</span>
<span
*
ngIf=
"data.
status
== 1"
(
click
)="
updateItem
(
data
.
itemid
,
0
)"
>
启用
</span>
</td>
</tr>
</tbody>
...
...
@@ -189,12 +188,10 @@
</nz-tab>
</nz-tabset>
</div>
</div>
<!--添加监测点-->
<smart-basi-check
#
smartCheck
></smart-basi-check>
<smart-basi-check
#
smartCheck
(
done
)="
getList
()"
></smart-basi-check>
<nz-modal
[
nzFooter
]="
null
"
nzWidth=
"1080"
[(
nzVisible
)]="
isGrapha
"
nzTitle=
""
(
nzOnCancel
)="
handleImageCancel
()"
>
<div
class=
"releative"
>
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
ce6139e0
...
...
@@ -35,6 +35,8 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
@
ViewChild
(
'smartCheck'
)
smartCheck
:
BasiCheckComponent
;
@
ViewChild
(
'thirdTabs'
)
thirdTabs
:
ElementRef
;
@
ViewChild
(
'warnList'
)
warnList
:
WarnListComponent
;
@
ViewChild
(
'colorEle'
)
colorEle
:
ElementRef
;
@
ViewChild
(
'checkEle'
)
checkEle
:
ElementRef
;
color
=
color
;
loading
=
false
;
hostId
:
string
;
...
...
@@ -119,9 +121,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
this
.
inOutInfo
();
//监测点
this
.
getCheckList
();
this
.
getCheckStatus
();
this
.
findItemType
();
this
.
getList
()
//历史告警
const
obj
=
{};
...
...
@@ -129,7 +129,9 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
}
ngAfterViewInit
()
{
// this.renderer.setElementStyle(this.thirdTabs.nativeElement,'margin-left','108px');
console
.
log
(
this
.
colorEle
.
nativeElement
.
offsetWidth
);
this
.
checkEle
.
nativeElement
.
children
[
1
].
children
[
0
].
children
[
0
].
children
[
2
].
children
[
0
].
children
[
0
].
children
[
2
].
style
.
marginRight
=
this
.
colorEle
.
nativeElement
.
offsetWidth
+
'px'
;
console
.
log
(
this
.
checkEle
.
nativeElement
.
children
[
1
].
children
[
0
].
children
[
0
].
children
[
2
].
children
[
0
].
children
[
0
].
children
[
2
].
style
.
marginRight
);
}
//平均响应时间
...
...
@@ -599,6 +601,13 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
this
.
smartCheck
.
showEditModal
(
this
.
hostId
,
item
.
itemid
);
}
//添加or编辑监测点 之后
getList
(){
this
.
getCheckList
();
this
.
getCheckStatus
();
this
.
findItemType
();
}
handleCheckCancel
()
{
this
.
isCheck
=
false
;
}
...
...
@@ -761,6 +770,11 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
this
.
overAllSer
.
findItemType
(
data
).
subscribe
(
(
res
)
=>
{
this
.
itemTypeList
=
res
.
data
;
const
data
=
{
applicationid
:
''
,
name
:
'全部'
}
this
.
itemTypeList
.
push
(
data
);
}
);
}
...
...
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
ce6139e0
...
...
@@ -527,6 +527,7 @@ export class BasicComponent implements OnInit {
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
info
(
'修改成功'
);
this
.
batchDelList
=
[];
this
.
findOpStatus
();
this
.
select
();
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
...
...
src/main/webapp/app/overAll/overAll.service.ts
View file @
ce6139e0
...
...
@@ -179,11 +179,15 @@ export class OverAllService {
return
this
.
http
.
post
(
SERVER_API_URL
+
'/graph/findGraphData/'
,
data
);
}
//监控项
编辑
//监控项
修改状态
itemUpdate
(
data
):
Observable
<
any
>
{
return
this
.
http
.
put
(
SERVER_API_URL
+
'/item/updata/'
,
data
);
}
itemUpdata
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/item/updata/'
,
data
);
}
//临时暂停
tempStop
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/host/tempStop'
,
data
);
...
...
src/main/webapp/app/shared/auth/auth-jwt.service.ts
View file @
ce6139e0
...
...
@@ -27,10 +27,8 @@ export class AuthServerProvider {
password
:
credentials
.
password
,
rememberMe
:
credentials
.
rememberMe
};
console
.
log
(
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/login'
,
data
,
{
observe
:
'response'
}).
map
(
authenticateSuccess
.
bind
(
this
));
function
authenticateSuccess
(
resp
)
{
console
.
log
(
resp
);
const
bearerToken
=
resp
.
body
.
data
;
if
(
bearerToken
)
{
this
.
$localStorage
.
store
(
'accessToken'
,
bearerToken
);
...
...
src/main/webapp/app/shared/login/login.component.ts
View file @
ce6139e0
...
...
@@ -92,7 +92,6 @@ export class JhiLoginModalComponent implements AfterViewInit,OnInit {
this
.
notification
.
create
(
'error'
,
'登录失败'
,
'用户名或密码错误'
,{
nzDuration
:
2000
});
}
}).
catch
(()
=>
{
console
.
log
(
'123'
);
this
.
authenticationError
=
true
;
});
}
...
...
src/main/webapp/app/shared/login/login.service.ts
View file @
ce6139e0
...
...
@@ -17,13 +17,11 @@ export class LoginService {
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
authServerProvider
.
login
(
credentials
).
subscribe
((
data
)
=>
{
console
.
log
(
data
);
this
.
principal
.
identity
(
true
).
then
((
account
)
=>
{
resolve
(
data
);
});
return
data
;
},
(
err
)
=>
{
console
.
log
(
err
);
this
.
logout
();
reject
(
err
);
return
cb
(
err
);
...
...
src/main/webapp/app/system/system.service.ts
View file @
ce6139e0
...
...
@@ -32,7 +32,6 @@ export class SystemService {
//用户列表
user
(
data
):
Observable
<
any
>
{
console
.
log
(
this
.
toTree
.
toQuery
(
data
));
return
this
.
http
.
get
(
SERVER_API_URL
+
'/user?'
+
this
.
toTree
.
toQuery
(
data
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment