@@ -118,7 +118,7 @@ <h3 class="card-title"></h3>
118118 </ div >
119119 </ div >
120120
121- < div id ="Pat " class ="col-sm-6 ">
121+ < div id ="Pat " class ="col-sm-5 ">
122122 <!-- text input -->
123123 < div class ="form-group ">
124124 < label id ="typestr "> @某人</ label >
@@ -127,6 +127,13 @@ <h3 class="card-title"></h3>
127127 </ div >
128128 </ div >
129129
130+ < div id ="Patrr " class ="col-sm-1 ">
131+ < div class ="form-check ">
132+ < input id ="patrr " class ="form-check-input " name ="patrr " type ="checkbox ">
133+ < label class ="form-check-label "> 轮询@某人</ label >
134+ </ div >
135+ </ div >
136+
130137 < div id ="Party " class ="col-sm-6 " style ="display:none ">
131138 <!-- text input -->
132139 < div class ="form-group ">
@@ -173,6 +180,7 @@ <h3 class="card-title"></h3>
173180 typeChange ( ) ;
174181 loadRules ( ) ;
175182 loadSendResolved ( ) ;
183+ loadAtSomeOneRR ( ) ;
176184 $ ( '#labeladd' ) . click ( function ( ) {
177185 var labeldiv = '<div class="row"> <div class="col-3"> <div class="form-group"> <label>Label Name</label> <input type="text" id="rules" class="form-control" name="rules" value="" placeholder="规则如 app=nginx,env=test"> </div> </div> <div class="col-3"> <div class="form-group"> <label>Label Value</label> <input type="text" id="rulesvalue" class="form-control" name="rulesvalue" value="" placeholder="规则如 app=nginx,env=test"> </div> </div> <div class="col-1 d-flex align-items-center"> <div class="form-check"> <input id="rulesregex" class="form-check-input" name="rulesregex" type="checkbox"> <label class="form-check-label">Regex</label> </div> </div> <div class="col-sm-1 d-flex align-items-center"> <div class="form-group"> <button id="labeldel" type="button" class="btn btn-danger btn-flat"><i class="fa fa-trash"></i></button> </div> </div></div> <br />' ;
178186 $ ( '#labelx' ) . append ( labeldiv )
@@ -212,6 +220,14 @@ <h3 class="card-title"></h3>
212220
213221}
214222
223+ function loadAtSomeOneRR ( ) {
224+ var checkbox = document . getElementById ( 'patrr' ) ;
225+ var atSomeOneRR = { { . AlertRouter . AtSomeOneRR} } ;
226+ if ( atSomeOneRR === true ) {
227+ checkbox . checked = true
228+ }
229+ }
230+
215231function typeChange ( ) {
216232 var tpl_id = document . getElementById ( "tpl_id" ) ;
217233 var tpltype = document . getElementById ( "tpltype" ) ;
@@ -222,48 +238,56 @@ <h3 class="card-title"></h3>
222238 typeStr . innerText = "钉钉机器人地址(多个请以,隔开)" ;
223239 document . getElementById ( "Purl" ) . style . display = "" ;
224240 document . getElementById ( "Pat" ) . style . display = "" ;
241+ document . getElementById ( "Patrr" ) . style . display = "" ;
225242 document . getElementById ( "Party" ) . style . display = "none" ;
226243 document . getElementById ( "Tag" ) . style . display = "none" ;
227244 } else if ( tpltype . value == "wx" ) {
228245 typeStr . innerText = "微信机器人地址(多个请以,隔开)" ;
229246 document . getElementById ( "Purl" ) . style . display = "" ;
230247 document . getElementById ( "Pat" ) . style . display = "" ;
248+ document . getElementById ( "Patrr" ) . style . display = "" ;
231249 document . getElementById ( "Party" ) . style . display = "none" ;
232250 document . getElementById ( "Tag" ) . style . display = "none" ;
233251 } else if ( tpltype . value == "fs" ) {
234252 typeStr . innerText = "飞书机器人地址(多个请以,隔开)" ;
235253 document . getElementById ( "Purl" ) . style . display = "" ;
236254 document . getElementById ( "Pat" ) . style . display = "" ;
255+ document . getElementById ( "Patrr" ) . style . display = "" ;
237256 document . getElementById ( "Party" ) . style . display = "none" ;
238257 document . getElementById ( "Tag" ) . style . display = "none" ;
239258 } else if ( tpltype . value == "fsapp" ) {
240259 typeStr . innerText = "飞书 用户open_id、user_id、union_ids、部门open_department_id" ;
241260 document . getElementById ( "Purl" ) . style . display = "none" ;
242261 document . getElementById ( "Pat" ) . style . display = "" ;
262+ document . getElementById ( "Patrr" ) . style . display = "" ;
243263 document . getElementById ( "Party" ) . style . display = "none" ;
244264 document . getElementById ( "Tag" ) . style . display = "none" ;
245265 } else if ( tpltype . value == "voice" ) {
246266 typeStr . innerText = "" ;
247267 document . getElementById ( "Purl" ) . style . display = "none" ;
248268 document . getElementById ( "Pat" ) . style . display = "none" ;
269+ document . getElementById ( "Patrr" ) . style . display = "none" ;
249270 document . getElementById ( "Party" ) . style . display = "none" ;
250271 document . getElementById ( "Tag" ) . style . display = "none" ;
251272 } else if ( tpltype . value == "webhook" ) {
252273 typeStr . innerText = "webhook地址(多个请以,隔开)" ;
253274 document . getElementById ( "Purl" ) . style . display = "" ;
254275 document . getElementById ( "Pat" ) . style . display = "none" ;
276+ document . getElementById ( "Patrr" ) . style . display = "none" ;
255277 document . getElementById ( "Party" ) . style . display = "none" ;
256278 document . getElementById ( "Tag" ) . style . display = "none" ;
257279 } else if ( tpltype . value == "email" ) {
258280 typeStr . innerText = "邮箱(多个请以,隔开)" ;
259281 document . getElementById ( "Purl" ) . style . display = "" ;
260282 document . getElementById ( "Pat" ) . style . display = "none" ;
283+ document . getElementById ( "Patrr" ) . style . display = "none" ;
261284 document . getElementById ( "Party" ) . style . display = "none" ;
262285 document . getElementById ( "Tag" ) . style . display = "none" ;
263286 } else if ( tpltype . value == "rl" ) {
264287 typeStr . innerText = "百度Hi(如流)群id" ;
265288 document . getElementById ( "Purl" ) . style . display = "" ;
266289 document . getElementById ( "Pat" ) . style . display = "none" ;
290+ document . getElementById ( "Patrr" ) . style . display = "none" ;
267291 document . getElementById ( "Party" ) . style . display = "none" ;
268292 document . getElementById ( "Tag" ) . style . display = "none" ;
269293 } else if ( tpltype . value == "workwechat" ) {
@@ -277,6 +301,7 @@ <h3 class="card-title"></h3>
277301 typeStr . innerText = "手机号(多个请以,隔开)" ;
278302 document . getElementById ( "Purl" ) . style . display = "" ;
279303 document . getElementById ( "Pat" ) . style . display = "none" ;
304+ document . getElementById ( "Patrr" ) . style . display = "none" ;
280305 document . getElementById ( "Party" ) . style . display = "none" ;
281306 document . getElementById ( "Tag" ) . style . display = "none" ;
282307 }
@@ -314,6 +339,7 @@ <h3 class="card-title"></h3>
314339 RouterTplId : $ ( '#tpl_id' ) . val ( ) ,
315340 RouterPurl : $ ( '#purl' ) . val ( ) ,
316341 RouterPat : $ ( '#pat' ) . val ( ) ,
342+ RouterPatRR : $ ( "#patrr" ) . is ( ":checked" ) ,
317343 RouterSendResolved : send_resolved ,
318344 Rules : RouterRules
319345 } ;
0 commit comments