Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hmdm_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ if [[ "$REPLY" =~ ^[Yy]$ ]]; then
cd $LOCATION/files
for FILE in $FILES; do
echo "Downloading $FILE..."
wget $FILE
wget https://h-mdm.com/files/hmdm-5.19-os.apk
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should not hard code version?

done
chown $TOMCAT_USER:$TOMCAT_USER *
echo "UPDATE applicationversions SET url=REPLACE(url, 'https://h-mdm.com', '$PROTOCOL://$BASE_HOST$BASE_PATH') WHERE url IS NOT NULL" | psql $PSQL_CONNSTRING >/dev/null 2>&1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,18 @@ public javax.ws.rs.core.Response generateQRCode(@PathParam("id") @ApiParam("Conf
@QueryParam("useId") @ApiParam("Which parameter to use as a device ID") String useId,
@QueryParam("group") @ApiParam("Groups to assign when creating a device") List<String> groups,
@Context HttpServletRequest req) {
logger.info("Generating QR-code image for configuration key: {}", id);
//logger.info("Generating QR-code image for configuration key: {}", id);
logger.info("Iniciando la generación del código QR para la configuración: {}", id);
try {
Configuration configuration = this.unsecureDAO.getConfigurationByQRCodeKey(id);
if (configuration != null) {
Integer mainAppId = configuration.getMainAppId();
logger.info("Configuración encontrada para la clave QR: {}", id);
if (mainAppId != null) {
ApplicationVersion appVersion = this.unsecureDAO.findApplicationVersionById(mainAppId);
logger.info("Main App encontrada para la clave QR: {}", id);
if (appVersion != null && appVersion.getUrl() != null && !appVersion.getUrl().trim().isEmpty()) {
logger.info("Versión de la app encontrada para la clave QR: {}", id);
final String apkUrl = appVersion.getUrl().replace(" ", "%20");
final String sha256;
if (appVersion.getApkHash() == null) {
Expand Down Expand Up @@ -231,7 +235,7 @@ public javax.ws.rs.core.Response generateQRCode(@PathParam("id") @ApiParam("Conf
"}\n";

logger.info("The base for QR code generation:\n{}", s);

return javax.ws.rs.core.Response.ok( (StreamingOutput) output -> {
int imageSize = 250;
if (size != null) {
Expand Down
200 changes: 111 additions & 89 deletions server/src/main/java/com/hmdm/rest/resource/SyncResource.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,40 @@ angular.module('headwind-kiosk')
function ($scope, configurationService, settingsService, $stateParams, $state, $rootScope, $window, $timeout,
$transitions, localization, confirmModal, alertService, $modal, appVersionComparisonService, settingsService) {


$scope.successMessage = null;

$scope.configuration = {
kioskMode: false,
kioskHome: false,
kioskRecents: false,
kioskNotifications: false,
kioskSystemInfo: false,
kioskKeyguard: false,
kioskLockButtons: false,
kioskExit: false
};


$scope.onKioskModeChange = function() {
if ($scope.configuration.kioskMode) {
console.log("Kiosk Mode activado");
} else {
console.log("Kiosk Mode desactivado");
}
};

$scope.logKioskMode = function () {
console.log("Kiosk Mode:", $scope.configuration.kioskMode);
console.log("Kiosk Home:", $scope.configuration.kioskHome);
console.log("Kiosk Recents:", $scope.configuration.kioskRecents);
console.log("Kiosk Notifications:", $scope.configuration.kioskNotifications);
console.log("Kiosk System Info:", $scope.configuration.kioskSystemInfo);
console.log("Kiosk Keyguard:", $scope.configuration.kioskKeyguard);
console.log("Kiosk Lock Buttons:", $scope.configuration.kioskLockButtons);
console.log("Kiosk Exit:", $scope.configuration.kioskExit);
};


let sortItem = $window.localStorage.getItem('HMDM_configAppsSortBy');
$scope.sort = {
Expand Down Expand Up @@ -658,6 +691,18 @@ angular.module('headwind-kiosk')
}
});
};

$scope.printKioskModeConfig = function() {
console.log("Configuración de Kiosk Mode:");
console.log("kioskMode:", $scope.configuration.kioskMode);
console.log("kioskHome:", $scope.configuration.kioskHome);
console.log("kioskRecents:", $scope.configuration.kioskRecents);
console.log("kioskNotifications:", $scope.configuration.kioskNotifications);
console.log("kioskSystemInfo:", $scope.configuration.kioskSystemInfo);
console.log("kioskKeyguard:", $scope.configuration.kioskKeyguard);
console.log("kioskLockButtons:", $scope.configuration.kioskLockButtons);
console.log("kioskExit:", $scope.configuration.kioskExit);
};

$scope.save = function (doClose) {
$scope.errorMessage = '';
Expand All @@ -672,6 +717,10 @@ angular.module('headwind-kiosk')
} else if ($scope.configuration.kioskMode && (!contentAppSelected)) {
$scope.errorMessage = localization.localize('error.empty.configuration.contentApp');
} else {

$scope.logKioskMode();
$scope.printKioskModeConfig();

var request = {};

for (var prop in $scope.configuration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,25 @@ angular.module('headwind-kiosk')
configurationService.getAllConfigurations(function (response) {
$scope.device.configurationId = response.data[0].id;
$scope.configurations = response.data;

// Agregamos aquí el código para mostrar las configuraciones del modo kiosko
var config = response.data[0]; // Recupera la primera configuración, puedes ajustar si necesitas otra

// Crear el mensaje con las configuraciones recuperadas
var message =
"Kiosk Mode: " + config.kioskMode + "\n" +
"Kiosk Home: " + config.kioskHome + "\n" +
"Kiosk Recents: " + config.kioskRecents + "\n" +
"Kiosk Notifications: " + config.kioskNotifications + "\n" +
"Kiosk System Info: " + config.kioskSystemInfo + "\n" +
"Kiosk Keyguard: " + config.kioskKeyguard + "\n" +
"Kiosk Lock Buttons: " + config.kioskLockButtons + "\n" +
"Kiosk Exit: " + config.kioskExit;

// Mostrar el mensaje en una ventana emergente
alert(message);
});


$scope.save = function () {
var ids = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,9 @@ <h3 ng-if="isTypical"><span localized>form.configuration.title.typical</span> &q
<div class='form-group'>
<label class='col-sm-3 control-label' localized>form.configuration.settings.mdm.kiosk.mode</label>
<div class='col-sm-1'>
<input ng-model='configuration.kioskMode' name="mdm3" type='checkbox' class='form-control'/>
<input ng-model='configuration.kioskMode' ng-change="onKioskModeChange()" name="mdm3" type='checkbox' class='form-control'/>
</div>
</div>
</div>

<div class='form-group'>
<label class='col-sm-3 control-label' localized>form.configuration.settings.mdm.app.main</label>
Expand Down Expand Up @@ -909,7 +909,7 @@ <h3 ng-if="isTypical"><span localized>form.configuration.title.typical</span> &q
<div class="config-bottom">&nbsp;</div>
<div class='form-group'>
<div class='config-save'>
<button type='submit' class='btn btn-default {{saveButtonClass()}}' ng-click='save(false)' localized>button.save</button>
<button type='submit' class='btn btn-default {{saveButtonClass()}}' ng-click='printKioskModeConfig(); save(false)' localized>button.save</button>
<button type='submit' class='btn btn-default' ng-click='save(true)' localized>button.save.and.close</button>
<button type='button' class='btn btn-default' ng-click='close()' localized>button.cancel</button>
</div>
Expand Down
5 changes: 5 additions & 0 deletions server/webtarget/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/webtarget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"grunt-contrib-copy": "~1.0.0"
},
"dependencies": {
"controlled-launcher-webclient": "file:",
"leaflet.gridlayer.googlemutant": "~0.8.0"
},
"resolutions": {
Expand Down