mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Add new filters to to gam report <ActivityApplicationName>
Some checks failed
Build and test GAM / build (false, build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (false, build, 10, Build x86_64 macOS 15, macos-15-intel) (push) Has been cancelled
Build and test GAM / build (false, build, 11, Build x86_64 macOS 26, macos-26-intel) (push) Has been cancelled
Build and test GAM / build (false, build, 12, Build Arm MacOS 26, macos-26) (push) Has been cancelled
Build and test GAM / build (false, build, 13, Build Intel Windows, windows-2025-vs2026) (push) Has been cancelled
Build and test GAM / build (false, build, 14, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (false, build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (false, build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (false, build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (false, build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (false, build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (false, build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (false, build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (false, test, 15, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (false, test, 16, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (false, test, 17, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (false, test, 18, Test Python 3.13, ubuntu-24.04, 3.13) (push) Has been cancelled
Build and test GAM / build (false, test, 19, Test Python 3.15-dev, ubuntu-24.04, 3.15-dev) (push) Has been cancelled
Build and test GAM / build (true, test, 20, Test Python 3.14 freethread, ubuntu-24.04, 3.14) (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-certs (push) Has been cancelled
Some checks failed
Build and test GAM / build (false, build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (false, build, 10, Build x86_64 macOS 15, macos-15-intel) (push) Has been cancelled
Build and test GAM / build (false, build, 11, Build x86_64 macOS 26, macos-26-intel) (push) Has been cancelled
Build and test GAM / build (false, build, 12, Build Arm MacOS 26, macos-26) (push) Has been cancelled
Build and test GAM / build (false, build, 13, Build Intel Windows, windows-2025-vs2026) (push) Has been cancelled
Build and test GAM / build (false, build, 14, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (false, build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (false, build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (false, build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (false, build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (false, build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (false, build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (false, build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (false, test, 15, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (false, test, 16, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (false, test, 17, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (false, test, 18, Test Python 3.13, ubuntu-24.04, 3.13) (push) Has been cancelled
Build and test GAM / build (false, test, 19, Test Python 3.15-dev, ubuntu-24.04, 3.15-dev) (push) Has been cancelled
Build and test GAM / build (true, test, 20, Test Python 3.14 freethread, ubuntu-24.04, 3.14) (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-certs (push) Has been cancelled
This commit is contained in:
@@ -4666,6 +4666,8 @@ gam report <ActivityApplicationName> [todrive <ToDriveAttribute>*]
|
|||||||
[event|events <EventNameList>] [ip <String>]
|
[event|events <EventNameList>] [ip <String>]
|
||||||
[gmaileventtypes <NumberRangeList>]
|
[gmaileventtypes <NumberRangeList>]
|
||||||
[groupidfilter <String>] [resourcedetailsfilter <String>]
|
[groupidfilter <String>] [resourcedetailsfilter <String>]
|
||||||
|
[networkinfofilter <String>] [statusfilter <String>]
|
||||||
|
[applicationinfofilter <String>] [includesensitivedata]
|
||||||
[notimesort]
|
[notimesort]
|
||||||
[maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
|
[maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
|
||||||
[countsonly [bydate|summary] [eventrowfilter]]
|
[countsonly [bydate|summary] [eventrowfilter]]
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ organizations/906207637890
|
|||||||
$ gam config gcp_org_id organizations/906207637890 save
|
$ gam config gcp_org_id organizations/906207637890 save
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Added the following options to `gam report <ActivityApplicationName>`.
|
||||||
|
```
|
||||||
|
networkinfofilter <String>
|
||||||
|
statusfilter <String>
|
||||||
|
applicationinfofilter <String>
|
||||||
|
includesensitivedata
|
||||||
|
```
|
||||||
|
|
||||||
7.37.00
|
7.37.00
|
||||||
|
|
||||||
Added new client access scopes used by `gam print tokens`.
|
Added new client access scopes used by `gam print tokens`.
|
||||||
|
|||||||
@@ -13873,6 +13873,14 @@ REPORT_ACTIVITIES_UPPERCASE_EVENTS = {
|
|||||||
'takeout',
|
'takeout',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
REPORT_ACTIVITIES_FILTER_MAP = {
|
||||||
|
'applicationinfofilter': 'applicationInfoFilter',
|
||||||
|
'groupidfilter': 'groupIdFilter',
|
||||||
|
'networkinfofilter': 'networkInfoFilter',
|
||||||
|
'resourcedetailsfilter': 'resourceDetailsFilter',
|
||||||
|
'statusfilter': 'statusFilter',
|
||||||
|
}
|
||||||
|
|
||||||
REPORT_ACTIVITIES_TIME_OBJECTS = {'time'}
|
REPORT_ACTIVITIES_TIME_OBJECTS = {'time'}
|
||||||
|
|
||||||
# gam report <ActivityApplictionName> [todrive <ToDriveAttribute>*]
|
# gam report <ActivityApplictionName> [todrive <ToDriveAttribute>*]
|
||||||
@@ -13884,6 +13892,8 @@ REPORT_ACTIVITIES_TIME_OBJECTS = {'time'}
|
|||||||
# [event|events <EventNameList>] [ip <String>]
|
# [event|events <EventNameList>] [ip <String>]
|
||||||
# [gmaileventtypes <NumberRangeList>]
|
# [gmaileventtypes <NumberRangeList>]
|
||||||
# [groupidfilter <String>] [resourcedetailsfilter <String>]
|
# [groupidfilter <String>] [resourcedetailsfilter <String>]
|
||||||
|
# [networkinfofilter <String>] [statusfilter <String>]
|
||||||
|
# [applicationinfofilter <String>] [includesensitivedata]
|
||||||
# [notimesort]
|
# [notimesort]
|
||||||
# [maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
|
# [maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
|
||||||
# [countsonly [bydate|summary] [eventrowfilter]]
|
# [countsonly [bydate|summary] [eventrowfilter]]
|
||||||
@@ -14162,6 +14172,12 @@ def doReport():
|
|||||||
else:
|
else:
|
||||||
events['accounts:used_quota_in_percentage'] = 0
|
events['accounts:used_quota_in_percentage'] = 0
|
||||||
|
|
||||||
|
def _getActivitiesFilters(myarg):
|
||||||
|
if myarg in REPORT_ACTIVITIES_FILTER_MAP:
|
||||||
|
kwargs[REPORT_ACTIVITIES_FILTER_MAP[myarg]] = getString(Cmd.OB_STRING)
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
# dynamically extend our choices with other reports Google dynamically adds
|
# dynamically extend our choices with other reports Google dynamically adds
|
||||||
rep = buildGAPIObject(API.REPORTS)
|
rep = buildGAPIObject(API.REPORTS)
|
||||||
dyn_choices = rep._rootDesc \
|
dyn_choices = rep._rootDesc \
|
||||||
@@ -14187,7 +14203,7 @@ def doReport():
|
|||||||
if customerId == GC.MY_CUSTOMER:
|
if customerId == GC.MY_CUSTOMER:
|
||||||
customerId = None
|
customerId = None
|
||||||
csvPF = CSVPrintFile()
|
csvPF = CSVPrintFile()
|
||||||
filters = actorIpAddress = groupIdFilter = orgUnit = orgUnitId = resourceDetailsFilter = None
|
filters = actorIpAddress = orgUnit = orgUnitId = None
|
||||||
showOrgUnit = False
|
showOrgUnit = False
|
||||||
parameters = set()
|
parameters = set()
|
||||||
parameterServices = set()
|
parameterServices = set()
|
||||||
@@ -14308,10 +14324,8 @@ def doReport():
|
|||||||
countsSummary = True
|
countsSummary = True
|
||||||
elif activityReports and myarg == 'eventrowfilter':
|
elif activityReports and myarg == 'eventrowfilter':
|
||||||
eventRowFilter = True
|
eventRowFilter = True
|
||||||
elif activityReports and myarg == 'groupidfilter':
|
elif activityReports and _getActivitiesFilters(myarg):
|
||||||
groupIdFilter = getString(Cmd.OB_STRING)
|
pass
|
||||||
elif activityReports and myarg == 'resourcedetailsfilter':
|
|
||||||
resourceDetailsFilter = getString(Cmd.OB_STRING)
|
|
||||||
elif activityReports and (report == 'gmail') and myarg == 'gmaileventtypes':
|
elif activityReports and (report == 'gmail') and myarg == 'gmaileventtypes':
|
||||||
gmailEventTypes = set(getNumberRangeList())
|
gmailEventTypes = set(getNumberRangeList())
|
||||||
elif activityReports and myarg == 'userisactor':
|
elif activityReports and myarg == 'userisactor':
|
||||||
@@ -14638,8 +14652,7 @@ def doReport():
|
|||||||
applicationName=report, userKey=user, customerId=customerId,
|
applicationName=report, userKey=user, customerId=customerId,
|
||||||
actorIpAddress=actorIpAddress, orgUnitID=orgUnitId,
|
actorIpAddress=actorIpAddress, orgUnitID=orgUnitId,
|
||||||
startTime=startEndTime.startTime, endTime=startEndTime.endTime,
|
startTime=startEndTime.startTime, endTime=startEndTime.endTime,
|
||||||
eventName=eventName, filters=pfilters, groupIdFilter=groupIdFilter,
|
eventName=eventName, filters=pfilters, maxResults=maxResults, **kwargs)
|
||||||
resourceDetailsFilter=resourceDetailsFilter, maxResults=maxResults, **kwargs)
|
|
||||||
except GAPI.badRequest:
|
except GAPI.badRequest:
|
||||||
if user != 'all':
|
if user != 'all':
|
||||||
entityUnknownWarning(Ent.USER, user, i, count)
|
entityUnknownWarning(Ent.USER, user, i, count)
|
||||||
|
|||||||
Reference in New Issue
Block a user