-
Notifications
You must be signed in to change notification settings - Fork 4
Test Configuration
Robert Polak edited this page Aug 27, 2019
·
9 revisions
Home / Test / Configuration
test\template\index.html
is the entry page for application (http://[domain.name]/client/3.0.0/test/index.html#) The file contains entries for Test Client API Library Java Script listed as below:
- api.constant.js
- api.config.js
- api.library.js
- api.plugin.js
<!DOCTYPE html>
<html lang="en">
<head>
<!-- API Constant -->
<script src="js/app.constant.js"></script>
<!-- API Configuration -->
<script src="js/app.config.js"></script>
<!-- API Global -->
<script src="js/app.global.js"></script>
<!-- API Plugin -->
<script src="js/app.plugin.js"></script>
<!-- API Library -->
<script src="js/app.library.js"></script>
</head>
http://[domain.name]/client/3.0.0/test/index.html#
The Test
folder contains templates definitions for Client API.
/config.json
contains development (debug) configuration parameters and constants.
Each Deployment environment have specific version of config.json
file:
-
test\config\config.json
- contains development (debug)template
configuration parameters and constants. -
test\config\config.test
- Test environment version ofconfig.json
-
test\config\config.uat
- UAT environment version ofconfig.json
-
test\config\config.live
- Lest environment version ofconfig.json
{
"url": {
"api": {
"public": "https://live-domain.extension/public/api.jsonrpc",
"private": "https://live-domain.extension/private/api.jsonrpc"
},
},
...
}
Code usage example:
app.config.url.api.private
api.ajax.jsonrpc.request(app.config.url.api.private, "PxStat.System.Settings.Language_API.Read", { LngIsoCode: null }, "app.create.initiate.callback.readLanguages");
{
...
"title": "Title [Live]",
...
}
{
"url": {
"api": {
"public": "https://live-domain.extension/public/api.jsonrpc",
"private": "https://live-domain.extension/private/api.jsonrpc"
},
"header": {
"logo": {
"alt": "YOUR LOGO HERE",
"src": "image/logo.png"
}
},
}
...
}
{
"url": {
"footer": [
{
"text": "Home",
"href": "https://domain.extension"
},
{
"text": "Contact Us",
"href": "https://domain.extension/contactus"
},
{
"text": "Privacy",
"href": "https://domain.extension/privacy"
},
{
"text": "Copyright",
"href": "https://domain.extension/copyright"
}
]
},
...
}
Code usage example:
app.config.url.footer.length
var numLinks = app.config.url.footer.length;
"cookieConsent": {
"palette": {
"popup": {
"background": "#45c1c0",
"text": "#ffffff"
},
"button": {
"background": "#006f74",
"text": "#ffffff"
}
},
"position": "top",
"static": true,
"content": {
"message": "This website uses cookies. By browsing this website, you agree to our use of cookies.",
"dismiss": "Close",
"link": "More info",
"href": "https://www.cso.ie/en/aboutus/lgdp/dataprotectiontransparency/websiteprivacystatement"
}
}
More details about the Client API Library /test
at Test.