Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sencha-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
sencha-core
Commits
edc8beed
Commit
edc8beed
authored
Apr 02, 2021
by
Project Open
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added getDebug to PO.Utilities statics procs
parent
9beea194
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
Utilities.adp
www/Utilities.adp
+21
-4
Utilities.tcl
www/Utilities.tcl
+9
-0
No files found.
www/Utilities.adp
View file @
edc8beed
...
...
@@ -82,9 +82,6 @@ Ext.define('PO.Utilities', {
msgBox.setOverflowXY('auto', 'auto');
},
/**
* Write out a message
*/
...
...
@@ -146,6 +143,26 @@ Ext.define('PO.Utilities', {
PO.Utilities.reportError("Error loading "+storeName, errorMsg)
},
/**
* Determine if debug is switched on for certain IDs.
* Check Admin -> Parameters -> intranet-timesheet2-weekly -> DebugHash
*/
getDebug: function(id) {
// Extract debugHash from ]po[ parameters
var debugHash = @debug_json;noquote@;
// Check for a debug setting for the specific Id
var debug = parseInt(debugHash[id]);
if (!isNaN(debug)) return debug;
// Use the default debug
debug = parseInt(debugHash['default']);
if (!isNaN(debug)) return debug;
// invalid configuration - enable debug
return 1;
},
/**
* Extract the current userId from the OpenACS session cookie
*/
...
...
@@ -185,7 +202,7 @@ Ext.define('PO.Utilities', {
mm = (m = d.getMinutes()) < 10 ? ('0'+m) : m;
ss = (s = d.getSeconds()) < 10 ? ('0'+s) : s;
// Handle time zone. Time zones with fractions of an hour need to be added with ':30'
// Handle time zone. Time zones with fractions of an hour need to be added with ':30'
tzSign = (tzo = d.getTimezoneOffset()/-60) < 0 ? '-' : '+';
tzAbs = Math.abs(tzo);
if (Math.floor(tzAbs) != tzAbs) {
...
...
www/Utilities.tcl
View file @
edc8beed
...
...
@@ -27,3 +27,12 @@ set sencha_version [lindex $sencha_version_tuples 0]; # "v421" or similar
set
sencha_version_prod_dev
[
lindex
$sencha
_version_tuples 1
];
#
"dev"
or
"prod"
set
sencha_version_package
[
lindex
$sencha
_version_tuples 2
];
#
"sencha-extjs-v421-dev"
or similar
# Create a debug JSON object that controls logging verbosity
set
debug_default
"default 0"
set
debug_list
[
parameter::get_from_package_key -package_key
"intranet-gantt-editor"
-parameter DebugHash -default
$debug
_default
]
array
set debug_hash
$debug
_list
set
debug_json_list
{}
foreach
id
[
array
names debug_hash
]
{
lappend debug_json_list
"'
$id
':
$debug
_hash(
$id
)"
}
set
debug_json
"{
\n\t
[
join
$debug
_json_list
",
\n\t
"
]
\n
}"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment