mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 09:51:36 +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>]
|
||||
[gmaileventtypes <NumberRangeList>]
|
||||
[groupidfilter <String>] [resourcedetailsfilter <String>]
|
||||
[networkinfofilter <String>] [statusfilter <String>]
|
||||
[applicationinfofilter <String>] [includesensitivedata]
|
||||
[notimesort]
|
||||
[maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
|
||||
[countsonly [bydate|summary] [eventrowfilter]]
|
||||
|
||||
@@ -16,6 +16,14 @@ organizations/906207637890
|
||||
$ 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
|
||||
|
||||
Added new client access scopes used by `gam print tokens`.
|
||||
|
||||
@@ -13873,6 +13873,14 @@ REPORT_ACTIVITIES_UPPERCASE_EVENTS = {
|
||||
'takeout',
|
||||
}
|
||||
|
||||
REPORT_ACTIVITIES_FILTER_MAP = {
|
||||
'applicationinfofilter': 'applicationInfoFilter',
|
||||
'groupidfilter': 'groupIdFilter',
|
||||
'networkinfofilter': 'networkInfoFilter',
|
||||
'resourcedetailsfilter': 'resourceDetailsFilter',
|
||||
'statusfilter': 'statusFilter',
|
||||
}
|
||||
|
||||
REPORT_ACTIVITIES_TIME_OBJECTS = {'time'}
|
||||
|
||||
# gam report <ActivityApplictionName> [todrive <ToDriveAttribute>*]
|
||||
@@ -13884,6 +13892,8 @@ REPORT_ACTIVITIES_TIME_OBJECTS = {'time'}
|
||||
# [event|events <EventNameList>] [ip <String>]
|
||||
# [gmaileventtypes <NumberRangeList>]
|
||||
# [groupidfilter <String>] [resourcedetailsfilter <String>]
|
||||
# [networkinfofilter <String>] [statusfilter <String>]
|
||||
# [applicationinfofilter <String>] [includesensitivedata]
|
||||
# [notimesort]
|
||||
# [maxactivities <Number>] [maxevents <Number>] [maxresults <Number>]
|
||||
# [countsonly [bydate|summary] [eventrowfilter]]
|
||||
@@ -14162,6 +14172,12 @@ def doReport():
|
||||
else:
|
||||
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
|
||||
rep = buildGAPIObject(API.REPORTS)
|
||||
dyn_choices = rep._rootDesc \
|
||||
@@ -14187,7 +14203,7 @@ def doReport():
|
||||
if customerId == GC.MY_CUSTOMER:
|
||||
customerId = None
|
||||
csvPF = CSVPrintFile()
|
||||
filters = actorIpAddress = groupIdFilter = orgUnit = orgUnitId = resourceDetailsFilter = None
|
||||
filters = actorIpAddress = orgUnit = orgUnitId = None
|
||||
showOrgUnit = False
|
||||
parameters = set()
|
||||
parameterServices = set()
|
||||
@@ -14308,10 +14324,8 @@ def doReport():
|
||||
countsSummary = True
|
||||
elif activityReports and myarg == 'eventrowfilter':
|
||||
eventRowFilter = True
|
||||
elif activityReports and myarg == 'groupidfilter':
|
||||
groupIdFilter = getString(Cmd.OB_STRING)
|
||||
elif activityReports and myarg == 'resourcedetailsfilter':
|
||||
resourceDetailsFilter = getString(Cmd.OB_STRING)
|
||||
elif activityReports and _getActivitiesFilters(myarg):
|
||||
pass
|
||||
elif activityReports and (report == 'gmail') and myarg == 'gmaileventtypes':
|
||||
gmailEventTypes = set(getNumberRangeList())
|
||||
elif activityReports and myarg == 'userisactor':
|
||||
@@ -14638,8 +14652,7 @@ def doReport():
|
||||
applicationName=report, userKey=user, customerId=customerId,
|
||||
actorIpAddress=actorIpAddress, orgUnitID=orgUnitId,
|
||||
startTime=startEndTime.startTime, endTime=startEndTime.endTime,
|
||||
eventName=eventName, filters=pfilters, groupIdFilter=groupIdFilter,
|
||||
resourceDetailsFilter=resourceDetailsFilter, maxResults=maxResults, **kwargs)
|
||||
eventName=eventName, filters=pfilters, maxResults=maxResults, **kwargs)
|
||||
except GAPI.badRequest:
|
||||
if user != 'all':
|
||||
entityUnknownWarning(Ent.USER, user, i, count)
|
||||
|
||||
Reference in New Issue
Block a user