Skip to content

DetectX Module#916

Merged
bochoven merged 9 commits into
munkireport:wipfrom
WardsParadox:wip
Dec 19, 2017
Merged

DetectX Module#916
bochoven merged 9 commits into
munkireport:wipfrom
WardsParadox:wip

Conversation

@WardsParadox

Copy link
Copy Markdown
Contributor

Will pull a json file from DetectX granted the admin deploying this module places it in the cache dir.

Added Status to client data (Clean/Infected) which is searchable
Tab for DetectX module uses the listing headers.
Fixed lacking localization for widget.
Added FA icon to Widget to match the style
Removed old outdated fr.json locale.
Comment thread app/modules/detectx/scripts/install.sh Outdated

# detectx controller
#CTL="${BASEURL}index.php?/module/detectx/"
# Set preference to include this file in the preflight check

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also drop an empty json so the client does not complain about the file not found

@bochoven

Copy link
Copy Markdown
Contributor

Thanks. Could you please fix the indenting? I have a hard time reading the code.. ;-D

@WardsParadox

Copy link
Copy Markdown
Contributor Author

Atom must be messing with it since I turned off softwraps. I'll get it all prettified and a touch statement to add an empty json file in install.sh then commit again.

@WardsParadox

Copy link
Copy Markdown
Contributor Author

@bochoven Is that any better?

Comment thread app/modules/detectx/detectx_model.php Outdated
$this->deleteWhere('serial_number=?', $this->serial_number);

// Process json into object thingy
$data = json_decode($json, true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block needs indenting

Comment thread app/modules/detectx/locales/en.json Outdated
"searchdate": "Search Date",
"status": "Status"
},
"widget": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also indent the JSON

@WardsParadox

Copy link
Copy Markdown
Contributor Author

@bochoven should be fixed now.

Comment thread app/modules/detectx/README.md Outdated
<string>/Applications/DetectX Swift.app/Contents/MacOS/DetectX Swift</string>
<string>search</string>
<string>-aj</string>
<string>/usr/loca/munki/preflight.d/cache/detectx.json</string>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Path is missing an 'l', should be /usr/local/munki/preflight.d/cache/detectx.json

Comment thread app/modules/detectx/provides.php Outdated
//
return array(
'client_tabs' => array(
'detectx-tab' => array('view' => 'detectx_tab', 'i18n' => 'detectx.clienttitle', 'badge' => 'detectx-cnt'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detectx.clienttitle does not exist in the locale.json. You may want to change that to detectx.title (this controls the name in the dropdown in the client detail page)

Comment thread app/modules/detectx/provides.php Outdated
'detectx-tab' => array('view' => 'detectx_tab', 'i18n' => 'detectx.clienttitle', 'badge' => 'detectx-cnt'),
),
'listings' => array(
'detectx' => array('view' => 'detectx_listing', 'i18n' => 'detectx.clienttitle'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detectx.clienttitle does not exist in the locale.json. You may want to change that to detectx.title (this controls the name in the dropdown in the listing menu)

Comment thread app/modules/detectx/detectx_model.php Outdated
{
parent::__construct('id', 'detectx'); //primary key, tablename
$this->rs['id'] = '';
$this->rs['serial_number'] = $serial;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a UNIQUE rt statement: $this->rt['serial_number'] = 'VARCHAR(255) UNIQUE';

Comment thread app/modules/detectx/detectx_model.php Outdated

// Add indexes
$this->idx[] = array('numberofissues');
$this->idx[] = array('status');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add an index on search date too.


<tbody>
<tr>
<td data-i18n="listing.loading" colspan="10" class="dataTables_empty"></td>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colspan= should be equal to the total amount of columns in the listing.

@WardsParadox

Copy link
Copy Markdown
Contributor Author

@bochoven @tuxudo Thanks for pointing those out, should be fixed now.

@bochoven bochoven merged commit 559d6bd into munkireport:wip Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants