@@ -222,18 +222,20 @@ def _parse_appcrit(self, crit):
222222 ot += ', ' .join ([escape (action ) for action in clist ])
223223 else :
224224 if 'All' in clist :
225- ot += 'All applications '
225+ ot += 'All resources '
226226 break
227227 if 'None' in clist :
228228 ot += 'None'
229229 break
230230 if 'Office365' in clist :
231- ot += 'All Office 365 applications'
231+ ot += 'All Office 365 applications '
232+ if 'MicrosoftAdminPortals' in clist :
233+ ot += 'All Microsoft Admin Portals '
232234 objects = self ._get_application (clist )
233235 if objects is not None :
234236 if len (objects ) > 0 :
235237 if ctype == 'Applications' :
236- ot += 'Applications : '
238+ ot += 'Resources : '
237239 ot += ', ' .join ([escape (uobj .displayName ) for uobj in objects ])
238240 return ot
239241
@@ -510,9 +512,9 @@ def main(self, should_print=False):
510512 print (policy .objectId )
511513 detail = json .loads (policy .policyDetail [0 ])
512514 if detail ['State' ] == 'Reporting' :
513- out ['name' ] += ' (<strong >Report only</strong >)'
515+ out ['name' ] += ' (<i >Report only</i >)'
514516 elif detail ['State' ] != 'Enabled' :
515- out ['name' ] += ' (<strong >Disabled</strong >)'
517+ out ['name' ] += ' (<i >Disabled</i >)'
516518 if should_print :
517519 pp .pprint (detail )
518520 try :
@@ -524,6 +526,7 @@ def main(self, should_print=False):
524526 print ('Invalid policy - no conditions' )
525527 continue
526528 out ['who' ] = self ._parse_who (conditions )
529+ out ['status' ] = escape (detail ['State' ])
527530 out ['applications' ] = self ._parse_application (conditions )
528531 out ['authflows' ] = self ._parse_authflows (conditions )
529532 out ['platforms' ] = self ._parse_platform (conditions )
@@ -601,7 +604,9 @@ def main(self, should_print=False):
601604 for out in ol :
602605 table = '<thead><tr><td colspan="2">{0}</td></tr></thead><tbody>' .format (out ['name' ])
603606 table += '<tr><td>Applies to</td><td>{0}</td></tr>' .format (out ['who' ])
604- table += '<tr><td>Applications</td><td>{0}</td></tr>' .format (out ['applications' ])
607+ if out ['status' ] != 'Enabled' :
608+ table += '<tr><td>Policy state</td><td>{0}</td></tr>' .format (out ['status' ])
609+ table += '<tr><td>Resources</td><td>{0}</td></tr>' .format (out ['applications' ])
605610 if out ['platforms' ] != '' :
606611 table += '<tr><td>On platforms</td><td>{0}</td></tr>' .format (out ['platforms' ])
607612 if out ['devices' ] != '' :
0 commit comments