View unanswered posts | View active topics It is currently 2019-12-12 8:09



Reply to topic  [ 4 posts ] 
 告警样式修改,只显示告警颜色框,不整个网元变色 
Author Message
新手上路

Joined: 2016-11-01 9:47
Posts: 28
Post 告警样式修改,只显示告警颜色框,不整个网元变色
网元告警时,不是整个变色,而是只在外边框变色,可以实现吗


2019-03-21 14:08
Profile
新手上路

Joined: 2016-11-01 9:47
Posts: 28
Post Re: 告警样式修改,只显示告警颜色框,不整个网元变色
求助,有人知道吗


2019-03-25 9:42
Profile
新手上路

Joined: 2019-03-25 10:57
Posts: 4
Post Re: 告警样式修改,只显示告警颜色框,不整个网元变色
您好,你的意思是说 网元告警时,不改变网元的样式颜色,只改变网元的外边框显示告警色是吗?


2019-03-25 11:07
Profile
新手上路

Joined: 2019-03-25 10:57
Posts: 4
Post Re: 告警样式修改,只显示告警颜色框,不整个网元变色
您好,抱歉让您久等了,关于您的问题,已找到解决方案。
网元告警时,改变了网元的填充颜色为告警状态对应的颜色,如果您不想网元告警时改变网元的填充色,可以重写network.getInnerColor()方法。
例如:
Code:
network.getInnerColor = function (data) {
        if(data.IElement){
           
            return data.getStyle('inner.color')//用于设置填充色的
        }
        return null;
    }

这样设置以后网元告警状态下仅会显示提示框,不会改变填充色;
您要设置网元告警状态下的边框色,可将这句代码修改为
Code:
var severity = data.getAlarmState().getHighestNativeAlarmSeverity();
            if(severity){
                node.s('outer.color','green')
            }

判断网元是否是告警状态,然后设置node的outer.color属性为自己想要的颜色


2019-03-25 11:57
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron