Ajout du lien vers la page Airwatch de l'appareil sur la fiche GLPI
This commit is contained in:
@ -22,7 +22,7 @@ args = parser.parse_args()
|
||||
if(args.configpath != None and args.configpath != ''):
|
||||
settings = getSettings(args.configpath)
|
||||
else:
|
||||
settings = getSettings("{os.path.realpath(os.path.dirname(__file__))}/conf/settings.conf")
|
||||
settings = getSettings(f"{os.path.realpath(os.path.dirname(__file__))}/conf/settings.conf")
|
||||
|
||||
#=========== Configuration des logs ===========#
|
||||
|
||||
@ -221,7 +221,12 @@ for device in devices:
|
||||
newFriendlyName = f"{data['1']} {platformName} {osVersion} - {device.User}"
|
||||
logger.info(f"Updating device friendlyname to {newFriendlyName}")
|
||||
airwatch.SetDeviceFriendlyName(device, newFriendlyName)
|
||||
|
||||
|
||||
# Mise à jour de l'url vers la page airwatch de l'appareil sur GLPI
|
||||
airwatchlink = f"{settings['AIRWATCH']['ConsoleURI']}/AirWatch/#/AirWatch/Device/Details/Summary/{device.Id}"
|
||||
if(data['76689'] != airwatchlink):
|
||||
glpiapi.UpdateAirwatchLink(deviceID, airwatchlink)
|
||||
|
||||
# filtre des plateformes
|
||||
if(platformFilterEnabled):
|
||||
if device.PlatformId in platformFilterOut:
|
||||
|
||||
Reference in New Issue
Block a user