Skip to content

Commit

Permalink
Update default application filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxudo committed Aug 4, 2024
1 parent b600ed2 commit 0b0a1da
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 313 deletions.
45 changes: 24 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@ Inventory module

Gathers inventory information found in `/Library/Managed Installs/ApplicationInventory.plist`

The table provides the following information per 'item':

* id (bigint) Unique id
* serial_number (string) Serial Number
* name (string) Name
* version (string) Version
* bundleid (string) Bundle ID
* bundlename (string) Bundle Name
* path (string) Path

Configuration
-------------
Expand All @@ -22,40 +13,42 @@ The inventory module has two settings that can be managed by adding them to the

List of bundle-ids to be ignored when processing inventoryThe list is processed using regex, examples:

Skip all virtual windows apps created by parallels and VMware
```bash
Skip all virtual windows apps created by parallels and VMware:
```
BUNDLEID_IGNORELIST='com.parallels.winapp.*, com.vmware.proxyApp.*'
```
Skip all Apple apps, except iLife, iWork and Server
```bash

Skip all Apple apps, except iLife, iWork and Server:
```
BUNDLEID_IGNORELIST='com.apple.(?!iPhoto)(?!iWork)(?!Aperture)(?!iDVD)(?!garageband)(?!iMovieApp)(?!Server).*'
```
Skip all apps with empty bundle-id's
```bash

Skip all apps with empty bundle-ID's:
```
BUNDLEID_IGNORELIST='^$'
```

Defaults:
```bash
```
BUNDLEID_IGNORELIST='com.parallels.winapp.*,com.vmware.proxyApp.*, com.apple.print.PrinterProxy, com.google.Chrome.app.*'
```

#### BUNDLEPATH_IGNORELIST

List of bundle-paths to be ignored when processing inventory. The list is processed using regex, examples:

Skip all apps in /System/Library
Skip all apps in /System/Library:
```bash
BUNDLEPATH_IGNORELIST='/System/Library/.*'

```
Skip all apps that are contained in an app bundle (Please note that backslashes need to be escaped)
Skip all apps that are contained in an app bundle (Please note that backslashes need to be escaped):
```bash
BUNDLEPATH_IGNORELIST='.*\\.app\\/.*\\.app'
```

Defaults:
```bash
BUNDLEPATH_IGNORELIST='/System/Library/.*, .*/Library/AutoPkg.*, /.DocumentRevisions-V100/.*, /Library/Application Support/Adobe/Uninstall/.*, .*/Library/Application Support/Google/Chrome/Default/Web Applications/.*'
```APPS_BUNDLEPATH_IGNORELIST='/System/Library/.*, '/System/Applications/.*', .*/Library/AutoPkg.*, /.DocumentRevisions-V100/.*, /Library/Application Support/Adobe/Uninstall/.*, .*/Library/Application Support/Google/Chrome/Default/Web Applications/.*', '.*/Library/Application Support/Firefox/Profiles/.*.default/storage/default/.*'
```

#### APPS_TO_TRACK
Expand All @@ -66,7 +59,7 @@ List of applications, by name, that you want to see in the apps
version report. If this is not set the report page will appear empty.
This is case insensitive but must be an array.

```bash
```
APPS_TO_TRACK='Flash Player, Java, Firefox, Microsoft Excel'
```
#### Single app widget
Expand All @@ -93,3 +86,13 @@ row3:
disk_report:
uptime:
```

Table Schema
------
* id (bigint) Unique id
* serial_number (string) Serial Number
* name (string) Name
* version (string) Version
* bundleid (string) Bundle ID
* bundlename (string) Bundle Name
* path (string) Path
2 changes: 2 additions & 0 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
]),
'bundlepath_ignorelist' => env('BUNDLEPATH_IGNORELIST', [
'/System/Library/.*',
'/System/Applications/.*',
'.*/Library/AutoPkg.*',
'/.DocumentRevisions-V100/.*',
'/Library/Application Support/Adobe/Uninstall/.*',
'.*/Library/Application Support/Google/Chrome/Default/Web Applications/.*',
'.*/Library/Application Support/Firefox/Profiles/.*.default/storage/default/.*',
]),
'apps_to_track' => env('APPS_TO_TRACK', ['Safari']),
];
3 changes: 1 addition & 2 deletions inventory_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public function __construct()
$this->module_path = dirname(__FILE__) .'/';
$this->view_path = $this->module_path . 'views/';
$this->modules = getMrModuleObj()->loadInfo();

}

public function index()
Expand All @@ -34,7 +33,7 @@ public function get_data($serial_number = '')
$obj = new View();
$obj->view('json', array('msg' => $out));
}

/**
* Get versions and count from an application
*
Expand Down
1 change: 1 addition & 0 deletions js/inventory_format.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var getNameLink = function(colNumber, row){
.text(appName)
)
}

var getVersionLink = function(colNumber, row){
var cell = $('td:eq('+colNumber+')', row);
var version = cell.text();
Expand Down
2 changes: 1 addition & 1 deletion migrations/2023_02_28_000000_inventory_bigint_id.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function up()
$table->bigIncrements('id')->change();
});
}

public function down()
{
$capsule = new Capsule();
Expand Down
79 changes: 0 additions & 79 deletions phpmigrations/001_inventoryitem_fix_indexes.php

This file was deleted.

140 changes: 0 additions & 140 deletions phpmigrations/002_inventoryitem_rename_serialcolumn.php

This file was deleted.

Loading

0 comments on commit 0b0a1da

Please sign in to comment.