profoundjs 6.0.5 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/htdocs/profoundui/proddata/images/FlatIcons/16x16/downloadSkin.png +0 -0
- package/htdocs/profoundui/proddata/images/FlatIcons/16x16/uploadSkin.png +0 -0
- package/htdocs/profoundui/proddata/js/designer.js +3897 -3808
- package/htdocs/profoundui/proddata/js/key_management.js +16 -22
- package/htdocs/profoundui/proddata/js/rich-display-react-component.js +42 -42
- package/htdocs/profoundui/proddata/js/rich-display-vue-component.js +27 -27
- package/htdocs/profoundui/proddata/js/runtime.js +1540 -1522
- package/htdocs/profoundui/proddata/js/soapclient.js +389 -396
- package/htdocs/profoundui/userdata/html/atrium_banner.html +3 -2
- package/htdocs/profoundui/userdata/templates/api-rest-crud.json +2 -2
- package/package.json +11 -1
- package/profound.jse +1 -1
- package/profoundjs.d.ts +16 -0
- package/setup/call.js +23 -20
- package/setup/completeInstall.js +0 -1
- package/setup/install.js +19 -1
- package/setup/install_info.json +20 -0
- package/setup/lic_client.js +9 -0
- package/setup/modules/puiscreens.json +6 -5
- package/setup/pjsdist.savf +0 -0
- package/setup/setup.js +89 -70
- package/setup/store_options.js +4 -0
- package/views/cloud.css +19 -6
- package/views/jquery-3.5.1.min.js +2 -0
- package/views/key.ejs +32 -2
- package/views/sessions.html +56 -0
- package/views/w2ui.es6.min.js +486 -0
- package/views/w2ui.min.css +2 -0
- package/setup/package.json +0 -23
package/profoundjs.d.ts
CHANGED
|
@@ -551,6 +551,22 @@ declare namespace pjs {
|
|
|
551
551
|
*/
|
|
552
552
|
export function sendRequest(options: object): any;
|
|
553
553
|
|
|
554
|
+
/**
|
|
555
|
+
* Used to send a request to a JSON API.
|
|
556
|
+
* @param method HTTP method to use. E.g. `post`, `get`, etc
|
|
557
|
+
* @param endpoint URL to the web service.
|
|
558
|
+
* @param options If an object is passed the request will be a JSON request,
|
|
559
|
+
* otherwise it will be a plain text request.
|
|
560
|
+
* @return Will return JSON if a JSON message is passed in.
|
|
561
|
+
*/
|
|
562
|
+
|
|
563
|
+
export function httpRequest(method: string, endpoint: string, message: object | string): any;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* @param options The 'options' object passed into the request API.
|
|
567
|
+
*/
|
|
568
|
+
export function httpRequest(options: object): any;
|
|
569
|
+
|
|
554
570
|
export function set(ProfoundJSVar: string, value: any): void;
|
|
555
571
|
|
|
556
572
|
/**
|
package/setup/call.js
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
async function call() {
|
|
4
|
+
// Load Profound.js
|
|
5
|
+
var profoundjs = require("profoundjs");
|
|
5
6
|
|
|
6
|
-
// Apply configuration
|
|
7
|
-
await profoundjs.applyConfig();
|
|
7
|
+
// Apply configuration
|
|
8
|
+
await profoundjs.applyConfig();
|
|
8
9
|
|
|
9
|
-
// Process command line parameters
|
|
10
|
-
var login = (process.argv.includes("-login") || process.argv.includes("--login"));
|
|
11
|
-
|
|
12
|
-
var moduleName = process.argv[2];
|
|
13
|
-
if (moduleName == null) {
|
|
14
|
-
console.log("You must specify a module.");
|
|
15
|
-
process.exit(1);
|
|
16
|
-
}
|
|
10
|
+
// Process command line parameters
|
|
11
|
+
var login = (process.argv.includes("-login") || process.argv.includes("--login"));
|
|
17
12
|
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
13
|
+
var moduleName = process.argv[2];
|
|
14
|
+
if (moduleName == null) {
|
|
15
|
+
console.log("You must specify a module.");
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
24
18
|
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
var parms = [];
|
|
20
|
+
for (var i = 3; i < process.argv.length; i++) {
|
|
21
|
+
var arg = process.argv[i];
|
|
22
|
+
if (arg.startsWith("-")) continue;
|
|
23
|
+
parms.push(arg);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Call module
|
|
27
|
+
profoundjs.commandLineCall(moduleName, parms, login);
|
|
28
|
+
}
|
|
29
|
+
call();
|
package/setup/completeInstall.js
CHANGED
package/setup/install.js
CHANGED
|
@@ -21,6 +21,16 @@
|
|
|
21
21
|
const fs = require("fs");
|
|
22
22
|
const iutils = require("./install_utils.js");
|
|
23
23
|
const path = require("path");
|
|
24
|
+
/*
|
|
25
|
+
NOTE: install_info.json
|
|
26
|
+
|
|
27
|
+
This file contains instructions for completing the installation.
|
|
28
|
+
It tells the process what questions to ask and what commands to run.
|
|
29
|
+
This file is shared with the GUI installer.
|
|
30
|
+
If any changes are made to how install_info.json is processed in this script,
|
|
31
|
+
the GUI installer will also need to be adjusted, retested, and updated.
|
|
32
|
+
*/
|
|
33
|
+
const install_info = require("./install_info.json");
|
|
24
34
|
|
|
25
35
|
const deployDir = iutils.getDeployDir();
|
|
26
36
|
if (!deployDir) {
|
|
@@ -29,7 +39,15 @@ if (!deployDir) {
|
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
// Install files.
|
|
32
|
-
|
|
42
|
+
if (fileExists(path.join(deployDir, "package.json"))) {
|
|
43
|
+
console.log("package.json exists.");
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
// Create user's skeleton package.json
|
|
47
|
+
const packageJSON = JSON.stringify(install_info.packageJSON, null, 2) + "\n";
|
|
48
|
+
fs.writeFileSync(path.join(deployDir, "package.json"), packageJSON);
|
|
49
|
+
console.log("package.json created.");
|
|
50
|
+
}
|
|
33
51
|
installFile("start.js");
|
|
34
52
|
installFile("complete_install.js", true);
|
|
35
53
|
|
package/setup/install_info.json
CHANGED
|
@@ -147,5 +147,25 @@
|
|
|
147
147
|
"command": "node removeExtraComponents.js --dry-run",
|
|
148
148
|
"cwd": "setup"
|
|
149
149
|
}
|
|
150
|
+
},
|
|
151
|
+
"packageJSON": {
|
|
152
|
+
"name": "profoundjs-deployment",
|
|
153
|
+
"version": "1.0.0",
|
|
154
|
+
"description": "Profound.js Deployment",
|
|
155
|
+
"keywords": [
|
|
156
|
+
"profound",
|
|
157
|
+
"profoundjs",
|
|
158
|
+
"pjs",
|
|
159
|
+
"profound logic",
|
|
160
|
+
"profoundlogic",
|
|
161
|
+
"profound ui",
|
|
162
|
+
"profoundui"
|
|
163
|
+
],
|
|
164
|
+
"scripts": {
|
|
165
|
+
"start": "node start.js"
|
|
166
|
+
},
|
|
167
|
+
"homepage": "http://profoundjs.com/",
|
|
168
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
169
|
+
"private": true
|
|
150
170
|
}
|
|
151
171
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"screen": {
|
|
6
6
|
"record format name": "signonscrn",
|
|
7
|
-
"onload": "if(window.puiMobileClient == null){\n if(window.device != null){\n if(window.device.platform != null){\n if(window.device.platform == \"iOS\"){\n applyProperty(\"btnBack\", \"visibility\", \"hidden\");\n applyProperty(\"btnBack\", \"field type\", \"
|
|
7
|
+
"onload": "if(window.puiMobileClient == null){\n if(window.device != null){\n if(window.device.platform != null){\n if(window.device.platform == \"iOS\"){\n applyProperty(\"btnBack\", \"visibility\", \"hidden\");\n applyProperty(\"btnBack\", \"field type\", \"graphic button\");\n applyProperty(\"SignOnButton\", \"width\", \"340px\");\n applyProperty(\"SignOnButton\", \"field type\", \"graphic button\");\n }\n } \n }\n}\npui.confirmOnClose = false;"
|
|
8
8
|
},
|
|
9
9
|
"items": [
|
|
10
10
|
{
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"screen": {
|
|
167
167
|
"record format name": "errscrn",
|
|
168
168
|
"disable enter key": "true",
|
|
169
|
-
"onload": "\nif (pui[\"errorScreen\"] && pui[\"errorScreen\"][\"onload\"]) {\n pui[\"errorScreen\"][\"onload\"]();\n}\nelse {\n // Backwards compatibility code for when pui[\"errorScreen\"][\"onload\"]() is not available\n if ((window[\"puiMobileClient\"] == null && window[\"device\"] != null &&\n window[\"device\"][\"platform\"] == \"iOS\") ||\n pui.genie != null) {\n applyProperty(\"btnBack\", \"visibility\", \"hidden\");\n applyProperty(\"btnBack\", \"field type\", \"
|
|
169
|
+
"onload": "\nif (pui[\"errorScreen\"] && pui[\"errorScreen\"][\"onload\"]) {\n pui[\"errorScreen\"][\"onload\"]();\n}\nelse {\n // Backwards compatibility code for when pui[\"errorScreen\"][\"onload\"]() is not available\n if ((window[\"puiMobileClient\"] == null && window[\"device\"] != null &&\n window[\"device\"][\"platform\"] == \"iOS\") ||\n pui.genie != null) {\n applyProperty(\"btnBack\", \"visibility\", \"hidden\");\n applyProperty(\"btnBack\", \"field type\", \"graphic button\");\n }\n if (pui.genie != null) {\n applyProperty(\"NewSessionButton\", \"value\", pui.getLanguageText(\"runtimeText\", \"ok\"));\n applyProperty(\"NewSessionButton\", \"onclick\", \"pui.click();\");\n }\n pui.formatErrorText();\n pui.confirmOnClose = false;\n pui.shutdownOnClose = false;\n}\n"
|
|
170
170
|
},
|
|
171
171
|
"items": [
|
|
172
172
|
{
|
|
@@ -704,7 +704,7 @@
|
|
|
704
704
|
{
|
|
705
705
|
"screen": {
|
|
706
706
|
"record format name": "eojscrn",
|
|
707
|
-
"onload": "if(window.device != null){\n if(window.device.platform != null){\n if(window.device.platform == \"iOS\"){\n applyProperty(\"btnBack\", \"visibility\", \"hidden\");\n applyProperty(\"btnBack\", \"field type\", \"
|
|
707
|
+
"onload": "if(window.device != null){\n if(window.device.platform != null){\n if(window.device.platform == \"iOS\"){\n applyProperty(\"btnBack\", \"visibility\", \"hidden\");\n applyProperty(\"btnBack\", \"field type\", \"graphic button\");\n applyProperty(\"NewSessionButton2\", \"width\", \"335px\");\n applyProperty(\"NewSessionButton2\", \"field type\", \"graphic button\");\n }\n }\n}\n\npui.endOfSession();"
|
|
708
708
|
},
|
|
709
709
|
"items": [
|
|
710
710
|
{
|
|
@@ -774,7 +774,7 @@
|
|
|
774
774
|
{
|
|
775
775
|
"screen": {
|
|
776
776
|
"record format name": "timoutscrn",
|
|
777
|
-
"onload": "if(window.device != null){\n if(window.device.platform != null){\n if(window.device.platform == \"iOS\"){\n applyProperty(\"btnBack\", \"visibility\", \"hidden\");\n applyProperty(\"btnBack\", \"field type\", \"
|
|
777
|
+
"onload": "if(window.device != null){\n if(window.device.platform != null){\n if(window.device.platform == \"iOS\"){\n applyProperty(\"btnBack\", \"visibility\", \"hidden\");\n applyProperty(\"btnBack\", \"field type\", \"graphic button\");\n applyProperty(\"NewSessionButton3\", \"width\", \"335px\");\n applyProperty(\"NewSessionButton3\", \"field type\", \"graphic button\");\n }\n }\n}\n\npui.endOfSession(\"Your session has timed out.\");"
|
|
778
778
|
},
|
|
779
779
|
"items": [
|
|
780
780
|
{
|
|
@@ -988,7 +988,8 @@
|
|
|
988
988
|
"rjZeroFill": "false",
|
|
989
989
|
"dataType": "varchar",
|
|
990
990
|
"formatting": "Text",
|
|
991
|
-
"textTransform": "none"
|
|
991
|
+
"textTransform": "none",
|
|
992
|
+
"designValue": "@media screen { #_id_ > .puiresp { display:grid; } }"
|
|
992
993
|
},
|
|
993
994
|
"use viewport": "true",
|
|
994
995
|
"bottom": "0px",
|
package/setup/pjsdist.savf
CHANGED
|
Binary file
|
package/setup/setup.js
CHANGED
|
@@ -28,8 +28,8 @@ const uuidv4 = require("uuid").v4;
|
|
|
28
28
|
|
|
29
29
|
const IBMi = iutils.isIBMi();
|
|
30
30
|
|
|
31
|
-
let RED
|
|
32
|
-
let CYAN
|
|
31
|
+
let RED = "\x1b[31m";
|
|
32
|
+
let CYAN = "\x1b[36m";
|
|
33
33
|
let RESET = "\x1b[0m";
|
|
34
34
|
|
|
35
35
|
const logDir = path.join(os.tmpdir(), "profoundjs-" + uuidv4());
|
|
@@ -40,7 +40,6 @@ let SILENT_MODE = false;
|
|
|
40
40
|
|
|
41
41
|
(async () => {
|
|
42
42
|
try {
|
|
43
|
-
|
|
44
43
|
// Parse arguments.
|
|
45
44
|
const args = minimist(
|
|
46
45
|
process.argv.slice(2),
|
|
@@ -64,7 +63,7 @@ let SILENT_MODE = false;
|
|
|
64
63
|
"ibmi-instance-node-path",
|
|
65
64
|
"nodegit-version"
|
|
66
65
|
],
|
|
67
|
-
unknown: function(arg) {
|
|
66
|
+
unknown: function (arg) {
|
|
68
67
|
console.error("Unknown argument:", arg);
|
|
69
68
|
process.exit(1);
|
|
70
69
|
}
|
|
@@ -73,7 +72,7 @@ let SILENT_MODE = false;
|
|
|
73
72
|
|
|
74
73
|
// Show help and quit, if requested.
|
|
75
74
|
if (args["help"]) {
|
|
76
|
-
|
|
75
|
+
const HELP = `Usage: npm run setup -- [OPTION]
|
|
77
76
|
-c, --config-file=<file> Alternate config file.
|
|
78
77
|
-h, --help Print this help and exit.
|
|
79
78
|
--nodegit Install nodegit.
|
|
@@ -298,6 +297,15 @@ let SILENT_MODE = false;
|
|
|
298
297
|
log("store_credentials.js created.");
|
|
299
298
|
}
|
|
300
299
|
|
|
300
|
+
// Create store_options.js.
|
|
301
|
+
if (fileExists(path.join(deployDir, "store_options.js"))) {
|
|
302
|
+
log("store_options.js file exists.");
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
copyFile(path.join(__dirname, "store_options.js"), deployDir, "utf8");
|
|
306
|
+
log("store_options.js created.");
|
|
307
|
+
}
|
|
308
|
+
|
|
301
309
|
// Create call.js.
|
|
302
310
|
if (fileExists(path.join(deployDir, "call.js"))) {
|
|
303
311
|
log("call.js file exists.");
|
|
@@ -307,6 +315,10 @@ let SILENT_MODE = false;
|
|
|
307
315
|
log("call.js created.");
|
|
308
316
|
}
|
|
309
317
|
|
|
318
|
+
// Create lic_client.js
|
|
319
|
+
copyFile(path.join(__dirname, "lic_client.js"), deployDir, "utf8");
|
|
320
|
+
log("lic_client.js created.");
|
|
321
|
+
|
|
310
322
|
// Convert start.js to Promises, if necessary.
|
|
311
323
|
const convertStartJS = require("./convertStartJS.js");
|
|
312
324
|
if (convertStartJS(path.join(deployDir, "start.js"))) {
|
|
@@ -317,7 +329,7 @@ let SILENT_MODE = false;
|
|
|
317
329
|
if (IBMi) {
|
|
318
330
|
log("");
|
|
319
331
|
if (args["ibmi-connector-library"] || args["ibmi-instance"] !== undefined) {
|
|
320
|
-
|
|
332
|
+
const portNumber = config.port || 8081;
|
|
321
333
|
let connectorLibrary = "*NONE";
|
|
322
334
|
let connectorIASP;
|
|
323
335
|
if (args["ibmi-connector-library"]) {
|
|
@@ -341,7 +353,7 @@ let SILENT_MODE = false;
|
|
|
341
353
|
}
|
|
342
354
|
}
|
|
343
355
|
// First, try copying the save file
|
|
344
|
-
|
|
356
|
+
let success = runCommand("CPYFRMSTMF FROMSTMF('" + __dirname + "/pjsdist.savf') TOMBR('/QSYS.LIB/QGPL.LIB/PJSDIST.FILE') MBROPT(*REPLACE)");
|
|
345
357
|
if (!success) {
|
|
346
358
|
logError("Unable to create installer save file.");
|
|
347
359
|
die();
|
|
@@ -357,13 +369,15 @@ let SILENT_MODE = false;
|
|
|
357
369
|
die();
|
|
358
370
|
}
|
|
359
371
|
// Now, try running PJSINSTALL
|
|
360
|
-
|
|
361
|
-
if (connectorLibrary != "*NONE")
|
|
372
|
+
let command = "QGPL/PJSINSTALL CONNLIB(" + connectorLibrary + ")";
|
|
373
|
+
if (connectorLibrary != "*NONE") {
|
|
362
374
|
command += " CONNIASP(" + connectorIASP + ") CONNHOST('localhost') CONNPORT(" + portNumber + ")";
|
|
375
|
+
}
|
|
363
376
|
command += " SVRNAME(" + svrname + ")";
|
|
364
|
-
if (svrname != "*NONE")
|
|
377
|
+
if (svrname != "*NONE") {
|
|
365
378
|
command += " SVRDIR('" + deployDir + "') " +
|
|
366
379
|
"SVRAUTO(" + ((autostart) ? "*YES" : "*NO") + ") CCSID(" + ccsid + ") NODEPATH('" + nodePath + "')";
|
|
380
|
+
}
|
|
367
381
|
success = runCommand(command, "-Ke");
|
|
368
382
|
// Clean up program and save file
|
|
369
383
|
log("");
|
|
@@ -393,7 +407,6 @@ let SILENT_MODE = false;
|
|
|
393
407
|
}
|
|
394
408
|
}
|
|
395
409
|
log(`\n${CYAN}Profound.js installation complete.${RESET}\n`);
|
|
396
|
-
|
|
397
410
|
}
|
|
398
411
|
catch (error) {
|
|
399
412
|
logError(error);
|
|
@@ -401,26 +414,26 @@ let SILENT_MODE = false;
|
|
|
401
414
|
}
|
|
402
415
|
})();
|
|
403
416
|
|
|
404
|
-
function log(...args) {
|
|
417
|
+
function log (...args) {
|
|
405
418
|
console.log(...args);
|
|
406
419
|
logToFile(...args);
|
|
407
420
|
}
|
|
408
421
|
|
|
409
|
-
function logError(...args) {
|
|
422
|
+
function logError (...args) {
|
|
410
423
|
console.error(...args);
|
|
411
424
|
logToFile(...args);
|
|
412
425
|
}
|
|
413
426
|
|
|
414
|
-
function logToFile(...args) {
|
|
427
|
+
function logToFile (...args) {
|
|
415
428
|
if (SILENT_MODE) {
|
|
416
429
|
return;
|
|
417
430
|
}
|
|
418
|
-
let output = `${util.format(...args)}\n`;
|
|
431
|
+
let output = `${util.format(...args)}\n`; // Mimic console.log().
|
|
419
432
|
output = output.replace(/\x1b\[[0-9]+m/g, ""); // Strip terminal escape codes for colors.
|
|
420
433
|
fs.writeFileSync(logFile, output, { flag: "a" });
|
|
421
434
|
}
|
|
422
435
|
|
|
423
|
-
function die() {
|
|
436
|
+
function die () {
|
|
424
437
|
logError(`\n${RED}Profound.js installation failed.${RESET}`);
|
|
425
438
|
if (!SILENT_MODE) {
|
|
426
439
|
console.error(`${RED}See installation log:${RESET} ${logPath}\n`);
|
|
@@ -428,12 +441,12 @@ function die() {
|
|
|
428
441
|
process.exit(1);
|
|
429
442
|
}
|
|
430
443
|
|
|
431
|
-
function copyDir(dir, destinationDir) {
|
|
444
|
+
function copyDir (dir, destinationDir) {
|
|
432
445
|
const dirName = path.basename(dir);
|
|
433
446
|
fs.mkdirSync(path.join(destinationDir, dirName));
|
|
434
447
|
const files = fs.readdirSync(dir);
|
|
435
|
-
files.forEach(function(file, index) {
|
|
436
|
-
if(fs.lstatSync(path.join(dir, file)).isDirectory()) { // recurse
|
|
448
|
+
files.forEach(function (file, index) {
|
|
449
|
+
if (fs.lstatSync(path.join(dir, file)).isDirectory()) { // recurse
|
|
437
450
|
copyDir(path.join(dir, file), path.join(destinationDir, dirName));
|
|
438
451
|
}
|
|
439
452
|
else {
|
|
@@ -442,20 +455,24 @@ function copyDir(dir, destinationDir) {
|
|
|
442
455
|
});
|
|
443
456
|
}
|
|
444
457
|
|
|
445
|
-
function copyFile(file, destination, type) {
|
|
458
|
+
function copyFile (file, destination, type) {
|
|
446
459
|
if (type == null) type = "binary";
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
460
|
+
let toFile;
|
|
461
|
+
if (directoryExists(destination)) {
|
|
462
|
+
toFile = path.join(destination, path.basename(file));
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
toFile = destination;
|
|
466
|
+
}
|
|
467
|
+
const content = fs.readFileSync(file, type);
|
|
452
468
|
fs.writeFileSync(toFile, content, type);
|
|
453
469
|
}
|
|
454
470
|
|
|
455
|
-
function createPuiscreens(deployDir) {
|
|
456
|
-
|
|
471
|
+
function createPuiscreens (deployDir) {
|
|
472
|
+
const targetPuiScreensFile = path.join(deployDir, "modules", "puiscreens.json");
|
|
473
|
+
function copyFileOldVersionIs (version, compareStr) {
|
|
457
474
|
compareStr = compareStr || "=";
|
|
458
|
-
log("Found Standard puiscreens.json file version "+compareStr+" "+version+", replacing with current version...");
|
|
475
|
+
log("Found Standard puiscreens.json file version " + compareStr + " " + version + ", replacing with current version...");
|
|
459
476
|
copyFile(path.join(__dirname, "modules", "puiscreens.json"), targetPuiScreensFile, "utf8");
|
|
460
477
|
log("puiscreens.json file was replaced.");
|
|
461
478
|
}
|
|
@@ -468,11 +485,15 @@ function createPuiscreens(deployDir) {
|
|
|
468
485
|
// 3. If it's not an official version, check if we have lower case User & Password. If not, then backup existing version to puiscreens_bak.json and install this official version.
|
|
469
486
|
// 4. Otherwise it's not an official version but should work OK. So leave existing puiscreens.json, and check if we already have a puiscreens_orig.json, and
|
|
470
487
|
// create it if not.
|
|
471
|
-
var targetPuiScreensFile = path.join(deployDir, "modules", "puiscreens.json");
|
|
472
488
|
if (fileExists(targetPuiScreensFile)) {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
489
|
+
const data = fs.readFileSync(targetPuiScreensFile);
|
|
490
|
+
const checksum = crypto.createHash("sha512").update(data).digest("hex"); // sha512 best for 64-bit
|
|
491
|
+
let format = null;
|
|
492
|
+
let puiScreens;
|
|
493
|
+
let goodUser = false;
|
|
494
|
+
let goodPassword = false;
|
|
495
|
+
let goodSubmit = false;
|
|
496
|
+
let goodError = false;
|
|
476
497
|
|
|
477
498
|
switch (checksum) {
|
|
478
499
|
case "4fb38daa851aacd21cf3aeaa92304df4e0353cae2b6dab3a5fd53c0cf4d42875b5efadbb4bb29642cbff07bfdd8e1c7a9c107f582905f7fc798c3841e888ee61":
|
|
@@ -522,39 +543,38 @@ function createPuiscreens(deployDir) {
|
|
|
522
543
|
|
|
523
544
|
case "3aaab88d4cf922f01a09bab3424ecf81460c7679a6d51ecb0f187fdce97e627499128e9b8c46d83075098e7e8f7150b73936056b1accedff55a79c69d65cb20b":
|
|
524
545
|
// Note: Betas were considered pre-release versions. 6.0.0 is the release version; so 6.0.0 is newer than 6.0.0-beta.X
|
|
525
|
-
|
|
546
|
+
copyFileOldVersionIs("6.0.0");
|
|
547
|
+
break;
|
|
548
|
+
|
|
549
|
+
case "41a350ae45c7616fe1824fb236b48ab64ca6d0de1023946e16ef9de4eea804649ff13123fa4ce630bb93308c8312f75e12448bbe58e91802dc8b12cc27bfd051":
|
|
550
|
+
log("Found Standard puiscreens.json file version > 6.0.0, no need for update.");
|
|
526
551
|
break;
|
|
527
552
|
|
|
528
553
|
default:
|
|
529
|
-
|
|
554
|
+
puiScreens = JSON.parse(data);
|
|
530
555
|
log("Found Customized puiscreens.json file, analyzing contents...");
|
|
531
556
|
|
|
532
557
|
// We need to check the signon screen and make sure we have lower case bound fields
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
var itemResponse = format.items[j].response;
|
|
547
|
-
if (itemResponse && typeof itemResponse === "object") {
|
|
548
|
-
if (itemResponse.fieldName === "sssubmit") goodSubmit = true;
|
|
549
|
-
}
|
|
550
|
-
var itemHtml = format.items[j].html;
|
|
551
|
-
if (itemHtml && typeof itemHtml === "object") {
|
|
552
|
-
if (itemHtml.fieldName === "sserror") goodError = true;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
if (goodUser && goodPassword && goodSubmit && goodError) break formats;
|
|
558
|
+
if (Array.isArray(puiScreens.formats)) {
|
|
559
|
+
format = puiScreens.formats.find(format => typeof format.screen["record format name"] === "string" && format.screen["record format name"].toLowerCase() === "signonscrn");
|
|
560
|
+
}
|
|
561
|
+
if (format) {
|
|
562
|
+
for (const j in format.items) {
|
|
563
|
+
const itemValue = format.items[j].value;
|
|
564
|
+
if (itemValue && typeof itemValue === "object") {
|
|
565
|
+
if (itemValue.fieldName === "ssuser") goodUser = true;
|
|
566
|
+
else if (itemValue.fieldName === "sspassword") goodPassword = true;
|
|
567
|
+
}
|
|
568
|
+
const itemResponse = format.items[j].response;
|
|
569
|
+
if (itemResponse && typeof itemResponse === "object") {
|
|
570
|
+
if (itemResponse.fieldName === "sssubmit") goodSubmit = true;
|
|
556
571
|
}
|
|
557
|
-
|
|
572
|
+
const itemHtml = format.items[j].html;
|
|
573
|
+
if (itemHtml && typeof itemHtml === "object") {
|
|
574
|
+
if (itemHtml.fieldName === "sserror") goodError = true;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
if (goodUser && goodPassword && goodSubmit && goodError) break;
|
|
558
578
|
}
|
|
559
579
|
}
|
|
560
580
|
|
|
@@ -578,10 +598,10 @@ function createPuiscreens(deployDir) {
|
|
|
578
598
|
}
|
|
579
599
|
}
|
|
580
600
|
|
|
581
|
-
function directoryExists(dir) {
|
|
582
|
-
|
|
601
|
+
function directoryExists (dir) {
|
|
602
|
+
let exists = false;
|
|
583
603
|
try {
|
|
584
|
-
|
|
604
|
+
const stat = fs.statSync(dir);
|
|
585
605
|
if (stat && stat.isDirectory()) exists = true;
|
|
586
606
|
}
|
|
587
607
|
catch (err) {
|
|
@@ -590,10 +610,10 @@ function directoryExists(dir) {
|
|
|
590
610
|
return exists;
|
|
591
611
|
}
|
|
592
612
|
|
|
593
|
-
function fileExists(file) {
|
|
594
|
-
|
|
613
|
+
function fileExists (file) {
|
|
614
|
+
let exists = false;
|
|
595
615
|
try {
|
|
596
|
-
|
|
616
|
+
const stat = fs.statSync(file);
|
|
597
617
|
if (stat && stat.isFile()) exists = true;
|
|
598
618
|
}
|
|
599
619
|
catch (err) {
|
|
@@ -602,10 +622,9 @@ function fileExists(file) {
|
|
|
602
622
|
return exists;
|
|
603
623
|
}
|
|
604
624
|
|
|
605
|
-
function runCommand(command, switches) {
|
|
606
|
-
|
|
625
|
+
function runCommand (command, switches) {
|
|
607
626
|
log("Executing IBM i command: " + command);
|
|
608
|
-
|
|
627
|
+
const args = [command];
|
|
609
628
|
if (typeof switches == "string") {
|
|
610
629
|
args.unshift(switches);
|
|
611
630
|
}
|
|
@@ -623,7 +642,8 @@ function runCommand(command, switches) {
|
|
|
623
642
|
env: {
|
|
624
643
|
QIBM_USE_DESCRIPTOR_STDIO: "Y",
|
|
625
644
|
QIBM_MULTI_THREADED: "N" // Many IBM commands cannot run in multi-threaded mode...
|
|
626
|
-
|
|
645
|
+
}
|
|
646
|
+
};
|
|
627
647
|
|
|
628
648
|
const results = child_process.spawnSync("system", args, options);
|
|
629
649
|
|
|
@@ -639,8 +659,7 @@ function runCommand(command, switches) {
|
|
|
639
659
|
}
|
|
640
660
|
else {
|
|
641
661
|
logError("Process ended due to signal %s", signal);
|
|
642
|
-
logError(results);
|
|
662
|
+
logError(results); // show full results including detailed error
|
|
643
663
|
}
|
|
644
664
|
return false;
|
|
645
|
-
|
|
646
665
|
}
|
package/views/cloud.css
CHANGED
|
@@ -258,10 +258,23 @@
|
|
|
258
258
|
letter-spacing: .25px;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
#_cloud_signin_button {
|
|
261
|
+
#_cloud_signin_button, #_cloud_signin_button_right {
|
|
262
262
|
margin-top: 15px;
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
@media (max-width: 575px) {
|
|
266
|
+
#_cloud_signin_button, #_cloud_signin_button_right {
|
|
267
|
+
width: 100%;
|
|
268
|
+
display:block;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
@media (min-width: 576px) {
|
|
272
|
+
#_cloud_signin_button, #_cloud_signin_button_right {
|
|
273
|
+
width: 47%;
|
|
274
|
+
}
|
|
275
|
+
#_cloud_signin_button_right {
|
|
276
|
+
float: right;
|
|
277
|
+
}
|
|
265
278
|
}
|
|
266
279
|
|
|
267
280
|
/*--- select template ---*/
|
|
@@ -602,9 +615,9 @@ span.pui-fa-brands-icons.fa-google {
|
|
|
602
615
|
}
|
|
603
616
|
|
|
604
617
|
._cloud_signin_col {
|
|
605
|
-
float: left;
|
|
606
|
-
width: 50%;
|
|
607
|
-
margin: auto;
|
|
618
|
+
/* float: left; */
|
|
619
|
+
/* width: 50%; */
|
|
620
|
+
/* margin: auto; */
|
|
608
621
|
padding: 0 40px;
|
|
609
622
|
margin-top: 6px;
|
|
610
623
|
box-sizing: border-box;
|