Skip to content

Commit

Permalink
Merge branch 'wip'
Browse files Browse the repository at this point in the history
  • Loading branch information
bochoven committed Oct 17, 2015
2 parents 6b4de84 + 84f5fbb commit 675631b
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 25 deletions.
8 changes: 5 additions & 3 deletions app/modules/directory_service/scripts/directoryservice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@ case "$DS" in
# osvers is 10 for 10.6, 11 for 10.7, 12 for 10.8, 13 for 10.9, etc.
osversionlong=$(uname -r)
osvers=${osversionlong/.*/}
localhostname=`/usr/sbin/scutil --get LocalHostName`

# Set variable for Domain
domain=`dscl localhost -list /Active\ Directory`
# Get AD computer object name
adbindname=$(defaults read "/Library/Preferences/OpenDirectory/Configurations/Active Directory/$domain" trustaccount)

if [[ ${osvers} -ge 11 ]]; then
AD_COMMENTS=`dscl /Search -read Computers/"${localhostname}"$ Comment 2>/dev/null | tr -d '\n' | awk '{$1 =""; print }'`
AD_COMMENTS=`dscl /Search -read Computers/"${adbindname}"$ Comment 2>/dev/null | tr -d '\n' | awk '{$1 =""; print }'`
fi

if [ "${osvers}" = 10 ]; then
AD_COMMENTS=`dscl /Active\ Directory/All\ Domains/ -read Computers/"${localhostname}"$ Comment 2>/dev/null | tr -d '\n' | awk '{$1 =""; print }'`
AD_COMMENTS=`dscl /Active\ Directory/All\ Domains/ -read Computers/"${adbindname}"$ Comment 2>/dev/null | tr -d '\n' | awk '{$1 =""; print }'`
fi

echo "Active Directory Comments = ${AD_COMMENTS}" >> "$DIR/cache/directoryservice.txt"
Expand Down
19 changes: 1 addition & 18 deletions app/views/dashboard/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,6 @@

</div> <!-- /container -->

<script>

// Automatically refresh widgets
$(document).on('appReady', function(e, lang) {

var delay = 60; // seconds
var refresh = function(){

$(document).trigger('appUpdate');

setTimeout(refresh, delay * 1000);
}

refresh();

});

</script>
<script src="<?php echo conf('subdirectory'); ?>assets/js/munkireport.autoupdate.js"></script>

<?php $this->view('partials/foot'); ?>
5 changes: 1 addition & 4 deletions app/views/install/install_script.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<?php header("Content-Type: text/plain");
?>#!/bin/bash

BASEURL="<?php echo
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] ? 'https://' : 'http://')
. $_SERVER['HTTP_HOST']
. conf('subdirectory'); ?>"
BASEURL="<?php echo conf('webhost') . conf('subdirectory'); ?>"
TPL_BASE="${BASEURL}/assets/client_installer/"
MUNKIPATH="/usr/local/munki/" # TODO read munkipath from munki config
CACHEPATH="${MUNKIPATH}preflight.d/cache/"
Expand Down
2 changes: 2 additions & 0 deletions app/views/report/appVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@

</div> <!-- /container -->

<script src="<?php echo conf('subdirectory'); ?>assets/js/munkireport.autoupdate.js"></script>

<?$this->view('partials/foot')?>
2 changes: 2 additions & 0 deletions app/views/report/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@

</div> <!-- /container -->

<script src="<?php echo conf('subdirectory'); ?>assets/js/munkireport.autoupdate.js"></script>

<?php $this->view('partials/foot'); ?>
2 changes: 2 additions & 0 deletions app/views/report/clients.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@

</div> <!-- /container -->

<script src="<?php echo conf('subdirectory'); ?>assets/js/munkireport.autoupdate.js"></script>

<?php $this->view('partials/foot'); ?>
2 changes: 2 additions & 0 deletions app/views/report/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@

</div> <!-- /container -->

<script src="<?php echo conf('subdirectory'); ?>assets/js/munkireport.autoupdate.js"></script>

<?php $this->view('partials/foot'); ?>
2 changes: 2 additions & 0 deletions app/views/report/hardware.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@

</div> <!-- /container -->

<script src="<?php echo conf('subdirectory'); ?>assets/js/munkireport.autoupdate.js"></script>

<?php $this->view('partials/foot'); ?>
2 changes: 2 additions & 0 deletions app/views/report/munki.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@

</div> <!-- /container -->

<script src="<?php echo conf('subdirectory'); ?>assets/js/munkireport.autoupdate.js"></script>

<?php $this->view('partials/foot'); ?>
2 changes: 2 additions & 0 deletions app/views/report/network.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@

</div> <!-- /container -->

<script src="<?php echo conf('subdirectory'); ?>assets/js/munkireport.autoupdate.js"></script>

<?php $this->view('partials/foot'); ?>
2 changes: 2 additions & 0 deletions app/views/report/power.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@

</div> <!-- /container -->

<script src="<?php echo conf('subdirectory'); ?>assets/js/munkireport.autoupdate.js"></script>

<?php $this->view('partials/foot'); ?>
14 changes: 14 additions & 0 deletions assets/js/munkireport.autoupdate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Automatically refresh widgets
$(document).on('appReady', function(e, lang) {

var delay = 60; // seconds
var refresh = function(){

$(document).trigger('appUpdate');

setTimeout(refresh, delay * 1000);
}

refresh();

});

0 comments on commit 675631b

Please sign in to comment.