revert-dabc3590
mharindu 9 years ago
commit be73e9a659

@ -18,7 +18,7 @@
function onRequest(context) { function onRequest(context) {
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["httpsURL"].replace("https", "wss"); var websocketEndpoint = devicemgtProps["httpsURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER); var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER);

@ -18,7 +18,7 @@
function onRequest(context){ function onRequest(context){
var viewModel = {}; var viewModel = {};
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
viewModel.hostName = devicemgtProps["httpsWebURL"]; viewModel.hostName = devicemgtProps["httpsWebURL"];
return viewModel; return viewModel;
} }

@ -17,7 +17,7 @@
*/ */
function onRequest(context) { function onRequest(context) {
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
var devices = context.unit.params.devices; var devices = context.unit.params.devices;
var deviceType = context.uriParams.deviceType; var deviceType = context.uriParams.deviceType;

@ -19,7 +19,7 @@
function onRequest(context) { function onRequest(context) {
var log = new Log("stats.js"); var log = new Log("stats.js");
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss"); var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER); var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER);

@ -23,7 +23,7 @@
* @returns {*} A context object that returns the dynamic state of this page to be presented * @returns {*} A context object that returns the dynamic state of this page to be presented
*/ */
function onRequest(context) { function onRequest(context) {
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
var page = {}; var page = {};
page["usernameJSRegEx"] = devicemgtProps.userValidationConfig.usernameJSRegEx; page["usernameJSRegEx"] = devicemgtProps.userValidationConfig.usernameJSRegEx;
page["usernameHelpText"] = devicemgtProps.userValidationConfig.usernameHelpMsg; page["usernameHelpText"] = devicemgtProps.userValidationConfig.usernameHelpMsg;

@ -17,7 +17,7 @@
*/ */
function onRequest(context) { function onRequest(context) {
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
var devices = context.unit.params.devices; var devices = context.unit.params.devices;
var deviceType = context.uriParams.deviceType; var deviceType = context.uriParams.deviceType;

@ -19,7 +19,7 @@
function onRequest(context) { function onRequest(context) {
var log = new Log("stats.js"); var log = new Log("stats.js");
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss"); var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER); var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER);

@ -17,7 +17,7 @@
*/ */
function onRequest(context) { function onRequest(context) {
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
var devices = context.unit.params.devices; var devices = context.unit.params.devices;
var deviceType = context.uriParams.deviceType; var deviceType = context.uriParams.deviceType;

@ -19,7 +19,7 @@
function onRequest(context) { function onRequest(context) {
var log = new Log("stats.js"); var log = new Log("stats.js");
var device = context.unit.params.device; var device = context.unit.params.device;
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss"); var websocketEndpoint = devicemgtProps["wssURL"].replace("https", "wss");
var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER); var tokenPair = session.get(constants.ACCESS_TOKEN_PAIR_IDENTIFIER);

@ -53,7 +53,6 @@ public class AndroidDevice implements Serializable {
) )
@NotNull @NotNull
@Size(min = 2, max = 45) @Size(min = 2, max = 45)
@Pattern(regexp = "^[A-Za-z0-9]*$")
private String deviceIdentifier; private String deviceIdentifier;
@ApiModelProperty( @ApiModelProperty(
name = "enrolmentInfo", name = "enrolmentInfo",

@ -18,7 +18,7 @@
function onRequest(context){ function onRequest(context){
var viewModel = {}; var viewModel = {};
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
viewModel.hostName = devicemgtProps["httpsURL"]; viewModel.hostName = devicemgtProps["httpsURL"];
return viewModel; return viewModel;
} }

@ -1,75 +1,80 @@
{ {
"appContext": "/emm/", "appContext": "/emm/",
"clientName": "emm", "clientName": "emm",
"webAgentContext" : "/emm-web-agent/", "webAgentContext" : "/emm-web-agent/",
"apiContext": "api", "apiContext": "api",
"httpsURL" : "%https.ip%", "httpsURL" : "%https.ip%",
"httpURL" : "%http.ip%", "httpURL" : "%http.ip%",
"httpsWebURL" : "%https.ip%", "httpsWebURL" : "%https.ip%",
"wssURL" : "%https.ip%", "wssURL" : "%https.ip%",
"wsURL" : "%http.ip%", "wsURL" : "%http.ip%",
"dashboardServerURL" : "%https.ip%", "dashboardServerURL" : "%https.ip%",
"enrollmentDir": "/emm-web-agent/enrollment", "enrollmentDir": "/emm-web-agent/enrollment",
"iOSConfigRoot" : "%https.ip%/ios-enrollment/", "iOSConfigRoot" : "%https.ip%/ios-enrollment/",
"iOSAPIRoot" : "%https.ip%/ios/", "iOSAPIRoot" : "%https.ip%/ios/",
"dynamicClientRegistrationEndPoint" : "https://localhost:9443/dynamic-client-web/register/", "dynamicClientRegistrationEndPoint" : "https://localhost:9443/dynamic-client-web/register/",
"adminService": "%https.ip%", "adminService": "%https.ip%",
"idPServer":"%https.ip%/oauth2/token", "idPServer":"%https.ip%/oauth2/token",
"callBackUrl":"%https.ip%/api/device-mgt/v1.0", "callBackUrl":"%https.ip%/api/device-mgt/v1.0",
"adminUser":"admin@carbon.super", "adminUser":"admin@carbon.super",
"adminRole":"admin", "adminRole":"admin",
"usernameLength":30, "usernameLength":30,
"pageSize":10, "pageSize":10,
"ssoConfiguration" : { "ssoConfiguration" : {
"enabled" : false, "enabled" : false,
"issuer" : "devicemgt", "issuer" : "devicemgt",
"appName" : "devicemgt", "appName" : "devicemgt",
"identityProviderURL" : "%https.ip%/sso/samlsso.jag", "identityProviderURL" : "%https.ip%/sso/samlsso.jag",
"responseSigningEnabled" : "true", "responseSigningEnabled" : "true",
"keyStorePassword" : "wso2carbon", "keyStorePassword" : "wso2carbon",
"identityAlias" : "wso2carbon", "identityAlias" : "wso2carbon",
"keyStoreName" : "/repository/resources/security/wso2carbon.jks" "keyStoreName" : "/repository/resources/security/wso2carbon.jks"
}, },
"userValidationConfig" : { "userValidationConfig" : {
"usernameJSRegEx" : "^[\\S]{3,30}$", "usernameJSRegEx" : "^[\\S]{3,30}$",
"usernameRegExViolationErrorMsg" : "Provided username is invalid.", "usernameRegExViolationErrorMsg" : "Provided username is invalid.",
"usernameHelpMsg" : "Should be in minimum 3 characters long and do not include any whitespaces.", "usernameHelpMsg" : "Should be in minimum 3 characters long and do not include any whitespaces.",
"firstnameJSRegEx" : "^[\\S]{3,30}$", "firstnameJSRegEx" : "^[\\S]{3,30}$",
"firstnameRegExViolationErrorMsg" : "Provided first name is invalid.", "firstnameRegExViolationErrorMsg" : "Provided first name is invalid.",
"lastnameJSRegEx" : "^[\\S]{3,30}$", "lastnameJSRegEx" : "^[\\S]{3,30}$",
"lastnameRegExViolationErrorMsg" : "Provided last name is invalid.", "lastnameRegExViolationErrorMsg" : "Provided last name is invalid.",
"emailJSRegEx" : "/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/", "emailJSRegEx" : "/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/",
"emailRegExViolationErrorMsg" : "Provided email is invalid." "emailRegExViolationErrorMsg" : "Provided email is invalid."
}, },
"groupValidationConfig": { "groupValidationConfig": {
"groupNameJSRegEx": "^[\\S]{3,30}$", "groupNameJSRegEx": "^[\\S]{3,30}$",
"groupNameRegExViolationErrorMsg": "Provided group name is invalid.", "groupNameRegExViolationErrorMsg": "Provided group name is invalid.",
"groupNameHelpMsg": "Should be in minimum 3 characters long and should not include any whitespaces." "groupNameHelpMsg": "Should be in minimum 3 characters long and should not include any whitespaces."
}, },
"roleValidationConfig" : { "roleValidationConfig" : {
"roleNameJSRegEx" : "^[\\S]{3,30}$", "roleNameJSRegEx" : "^[\\S]{3,30}$",
"roleNameRegExViolationErrorMsg" : "Provided role name is invalid.", "roleNameRegExViolationErrorMsg" : "Provided role name is invalid.",
"roleNameHelpMsg" : "should be in minimum 3 characters long and do not include any whitespaces." "roleNameHelpMsg" : "should be in minimum 3 characters long and do not include any whitespaces."
}, },
"generalConfig" : { "generalConfig" : {
"host" : "https://localhost:9443", "host" : "https://localhost:9443",
"companyName" : "WSO2 Carbon Device Manager", "companyName" : "WSO2 Carbon Device Manager",
"browserTitle" : "WSO2 Device Manager", "browserTitle" : "WSO2 Device Manager",
"copyrightPrefix" : "\u00A9 %date-year%, ", "copyrightPrefix" : "\u00A9 %date-year%, ",
"copyrightOwner" : "WSO2 Inc.", "copyrightOwner" : "WSO2 Inc.",
"copyrightOwnersSite" : "http://www.wso2.org", "copyrightOwnersSite" : "http://www.wso2.org",
"copyrightSuffix" : " All Rights Reserved." "copyrightSuffix" : " All Rights Reserved."
}, },
"scopes" : [ "scopes" : [
"license-add", "license-view", "device-view", "device-info", "device-list", "device-view-own", "license-add", "license-view", "device-view",
"device-modify", "device-search", "operation-install", "operation-view", "operation-modify", "operation-uninstall", "device-info", "device-list", "device-view-own", "device-modify", "device-search",
"group-add", "group-share", "group-modify", "group-view", "group-remove", "certificate-modify", "certificate-view", "operation-install", "operation-view", "operation-modify", "operation-uninstall",
"configuration-view", "configuration-modify", "policy-view", "policy-modify", "device-notification-view", "group-add", "group-share", "group-modify", "group-view", "group-remove",
"device-notification-modify", "feature-view", "roles-view", "roles-modify", "roles-remove", "roles-add", "certificate-modify", "certificate-view",
"user-password-reset", "user-password-modify", "user-modify", "user-view", "user-invite", "user-remove", "user-add" "configuration-view", "configuration-modify",
], "policy-view", "policy-modify",
"isOAuthEnabled" : true, "device-notification-view", "device-notification-modify",
"backendRestEndpoints" : { "feature-view",
"deviceMgt" : "/api/device-mgt/v1.0" "roles-view", "roles-modify", "roles-remove", "roles-add",
} "user-password-reset", "user-password-modify", "user-modify", "user-view", "user-invite", "user-remove", "user-add"
],
"isOAuthEnabled" : true,
"backendRestEndpoints" : {
"deviceMgt" : "/api/device-mgt/v1.0"
}
} }

@ -18,7 +18,7 @@
function onRequest(context){ function onRequest(context){
var viewModel = {}; var viewModel = {};
var devicemgtProps = require('/app/conf/devicemgt-props.js').config(); var devicemgtProps = require("/app/conf/reader/main.js")["conf"];
viewModel.hostName = devicemgtProps["httpsURL"]; viewModel.hostName = devicemgtProps["httpsURL"];
return viewModel; return viewModel;
} }
Loading…
Cancel
Save