Adding changes to descriptor

4.x.x
Ace 8 years ago
commit 8cc0ba56c1

@ -34,8 +34,8 @@ import javax.xml.bind.annotation.XmlType;
* <complexContent> * <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence> * <sequence>
* <element name="jndiConfig" type="{}jndiConfig"/> * <element name="JndiConfig" type="{}JndiConfig"/>
* <element name="tableConfig" type="{}tableConfig"/> * <element name="TableConfig" type="{}TableConfig"/>
* </sequence> * </sequence>
* </restriction> * </restriction>
* </complexContent> * </complexContent>
@ -51,9 +51,10 @@ import javax.xml.bind.annotation.XmlType;
}) })
public class DataSource { public class DataSource {
@XmlElement(required = true) @XmlElement(name = "JndiConfig", required = true)
protected JndiConfig jndiConfig; protected JndiConfig jndiConfig;
@XmlElement(required = true)
@XmlElement(name = "TableConfig", required = true)
protected TableConfig tableConfig; protected TableConfig tableConfig;
/** /**

@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlType;
* <p>The following schema fragment specifies the expected content contained within this class. * <p>The following schema fragment specifies the expected content contained within this class.
* *
* <pre> * <pre>
* &lt;complexType name="jndiConfig"> * &lt;complexType name="JndiConfig">
* &lt;complexContent> * &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence> * &lt;sequence>
@ -44,12 +44,12 @@ import javax.xml.bind.annotation.XmlType;
* *
*/ */
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "jndiConfig", propOrder = { @XmlType(name = "JndiConfig", propOrder = {
"name" "name"
}) })
public class JndiConfig { public class JndiConfig {
@XmlElement(required = true) @XmlElement(name = "Name", required = true)
protected String name; protected String name;
/** /**

@ -46,7 +46,7 @@ import javax.xml.bind.annotation.XmlType;
* *
*/ */
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "tableConfig", propOrder = { @XmlType(name = "TableConfig", propOrder = {
"table" "table"
}) })
public class TableConfig { public class TableConfig {

@ -125,6 +125,11 @@ $("#policy-name-input").focus(function(){
validateInline["policy-name"](); validateInline["policy-name"]();
}); });
/**
* Forward action of device type selection step. Loads relevant policy profile configurations.
*
* @param actionButton
*/
stepForwardFrom["policy-platform"] = function (actionButton) { stepForwardFrom["policy-platform"] = function (actionButton) {
$("#device-type-policy-operations").html("").addClass("hidden"); $("#device-type-policy-operations").html("").addClass("hidden");
$("#generic-policy-operations").addClass("hidden"); $("#generic-policy-operations").addClass("hidden");
@ -175,17 +180,26 @@ stepForwardFrom["policy-platform"] = function (actionButton) {
}); });
}; };
/**
* Forward action of policy profile page. Generates policy profile payload.
*/
stepForwardFrom["policy-profile"] = function () { stepForwardFrom["policy-profile"] = function () {
policy["profile"] = operationModule.generateProfile(policy["platform"], configuredOperations); policy["profile"] = operationModule.generateProfile(policy["platform"], configuredOperations);
// updating next-page wizard title with selected platform // updating next-page wizard title with selected platform
$("#policy-criteria-page-wizard-title").text("ADD " + policy["platform"] + " POLICY"); $("#policy-criteria-page-wizard-title").text("ADD " + policy["platform"] + " POLICY");
}; };
/**
* Backward action of policy profile page. Moves back to platform selection step.
*/
stepBackFrom["policy-profile"] = function () { stepBackFrom["policy-profile"] = function () {
// reinitialize configuredOperations // reinitialize configuredOperations
configuredOperations = []; configuredOperations = [];
}; };
/**
* Forward action of policy criteria page.
*/
stepForwardFrom["policy-criteria"] = function () { stepForwardFrom["policy-criteria"] = function () {
$("input[type='radio'].select-users-radio").each(function () { $("input[type='radio'].select-users-radio").each(function () {
if ($(this).is(':radio')) { if ($(this).is(':radio')) {
@ -223,6 +237,11 @@ var inputIsValidAgainstLength = function (input, minLength, maxLength) {
return (length == minLength || (length > minLength && length < maxLength) || length == maxLength); return (length == minLength || (length > minLength && length < maxLength) || length == maxLength);
}; };
/**
* Validates policy criteria inputs.
*
* @returns {boolean} whether the validation is successful.
*/
validateStep["policy-criteria"] = function () { validateStep["policy-criteria"] = function () {
var validationStatus = {}; var validationStatus = {};
var selectedAssignees; var selectedAssignees;
@ -261,6 +280,11 @@ validateStep["policy-criteria"] = function () {
return wizardIsToBeContinued; return wizardIsToBeContinued;
}; };
/**
* Validating policy naming.
*
* @returns {boolean} whether the validation is successful.
*/
validateStep["policy-naming"] = function () { validateStep["policy-naming"] = function () {
var validationStatus = {}; var validationStatus = {};
@ -390,7 +414,7 @@ var savePolicy = function (policy, isActive, serviceURL) {
payload["roles"] = []; payload["roles"] = [];
} }
if(policy["selectedGroups"]) { if(policy["selectedGroups"] && policy["selectedGroups"][0] !== "NONE") {
payload["deviceGroups"] = policy["selectedGroups"]; payload["deviceGroups"] = policy["selectedGroups"];
} }

@ -223,12 +223,18 @@ skipStep["policy-platform"] = function (policyPayloadObj) {
}); });
}; };
/**
* Forward action of policy profile page. Generates policy profile payload.
*/
stepForwardFrom["policy-profile"] = function () { stepForwardFrom["policy-profile"] = function () {
policy["profile"] = operationModule.generateProfile(policy["platform"], configuredOperations); policy["profile"] = operationModule.generateProfile(policy["platform"], configuredOperations);
// updating next-page wizard title with selected platform // updating next-page wizard title with selected platform
$("#policy-criteria-page-wizard-title").text("EDIT " + policy["platform"] + " POLICY - " + policy["name"]); $("#policy-criteria-page-wizard-title").text("EDIT " + policy["platform"] + " POLICY - " + policy["name"]);
}; };
/**
* Forward action of policy criteria page.
*/
stepForwardFrom["policy-criteria"] = function () { stepForwardFrom["policy-criteria"] = function () {
$("input[type='radio'].select-users-radio").each(function () { $("input[type='radio'].select-users-radio").each(function () {
if ($(this).is(':radio')) { if ($(this).is(':radio')) {
@ -267,6 +273,11 @@ var inputIsValidAgainstLength = function (input, minLength, maxLength) {
return (length == minLength || (length > minLength && length < maxLength) || length == maxLength); return (length == minLength || (length > minLength && length < maxLength) || length == maxLength);
}; };
/**
* Validates policy criteria inputs.
*
* @returns {boolean} whether the validation is successful.
*/
validateStep["policy-criteria"] = function () { validateStep["policy-criteria"] = function () {
var validationStatus = {}; var validationStatus = {};
var selectedAssignees; var selectedAssignees;
@ -305,6 +316,11 @@ validateStep["policy-criteria"] = function () {
return wizardIsToBeContinued; return wizardIsToBeContinued;
}; };
/**
* Validating policy naming.
*
* @returns {boolean} whether the validation is successful.
*/
validateStep["policy-naming"] = function () { validateStep["policy-naming"] = function () {
var validationStatus = {}; var validationStatus = {};
@ -444,7 +460,7 @@ var updatePolicy = function (policy, state) {
payload["roles"] = []; payload["roles"] = [];
} }
if (policy["selectedGroups"]) { if (policy["selectedGroups"] && policy["selectedGroups"][0] !== "NONE") {
payload["deviceGroups"] = policy["selectedGroups"]; payload["deviceGroups"] = policy["selectedGroups"];
} }

Loading…
Cancel
Save