Merge branch 'release-2.0.x' of https://github.com/wso2/carbon-device-mgt into release-2.0.x

revert-70aa11f8
Hasunie 8 years ago
commit 40d8488466

@ -49,10 +49,6 @@
<warName>api#scep-mgt#v1.0</warName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
</plugin>
</plugins>
</build>

@ -1,19 +1,50 @@
package org.wso2.carbon.certificate.mgt.jaxrs.api;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.Authorization;
import io.swagger.annotations.AuthorizationScope;
import io.swagger.annotations.Extension;
import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Info;
import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.certificate.mgt.jaxrs.beans.ErrorResponse;
import javax.ws.rs.*;
import javax.ws.rs.Consumes;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@SwaggerDefinition(
info = @Info(
version = "1.0.0",
title = "",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = "name", value = "SCEP Management"),
@ExtensionProperty(name = "context", value = "/api/device-mgt/v1.0/scep"),
})
}
),
tags = {
@Tag(name = "scep_management", description = "SCEP management related REST-API. " +
"This can be used to manipulated device " +
"certificate related details.")
}
)
@Path("/scep")
@Api(value = "SCEP Management", description = "This API carries all device Certificate management " +
"related operations.")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface CertificateMgtService {
/**

@ -29,7 +29,7 @@ import javax.ws.rs.core.Response;
extensions = {
@Extension(properties = {
@ExtensionProperty(name = "name", value = "Certificate Management"),
@ExtensionProperty(name = "context", value = "api/certificate-mgt/v1.0/admin/certificates"),
@ExtensionProperty(name = "context", value = "/api/certificate-mgt/v1.0/admin/certificates"),
})
}
),

@ -34,8 +34,8 @@ import javax.xml.bind.annotation.XmlType;
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="jndiConfig" type="{}jndiConfig"/>
* &lt;element name="tableConfig" type="{}tableConfig"/>
* &lt;element name="JndiConfig" type="{}JndiConfig"/>
* &lt;element name="TableConfig" type="{}TableConfig"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
@ -51,9 +51,10 @@ import javax.xml.bind.annotation.XmlType;
})
public class DataSource {
@XmlElement(required = true)
@XmlElement(name = "JndiConfig", required = true)
protected JndiConfig jndiConfig;
@XmlElement(required = true)
@XmlElement(name = "TableConfig", required = true)
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.
*
* <pre>
* &lt;complexType name="jndiConfig">
* &lt;complexType name="JndiConfig">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
@ -44,12 +44,12 @@ import javax.xml.bind.annotation.XmlType;
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "jndiConfig", propOrder = {
@XmlType(name = "JndiConfig", propOrder = {
"name"
})
public class JndiConfig {
@XmlElement(required = true)
@XmlElement(name = "Name", required = true)
protected String name;
/**

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

@ -3,6 +3,7 @@
"cachingEnabled": false,
"debuggingEnabled": false,
"permissionRoot": "/",
"portalURL": "https://${server.ip}:9445",
"loginPage": "cdmf.page.sign-in",
"adminServicesUrl": "https://${server.ip}:${server.https_port}/admin/services/",
"authModule": {

@ -7,6 +7,7 @@
"httpsWebURL" : "%https.ip%",
"wssURL" : "https://localhost:9445",
"wsURL" : "%http.ip%",
"portalURL": "https://${server.ip}:9445",
"dashboardServerURL" : "%https.ip%",
"androidEnrollmentDir": "/android-web-agent/enrollment",
"windowsEnrollmentDir": "/windows-web-agent/enrollment",

@ -72,7 +72,7 @@
</ul>
</div>
<div id="certificate-table" data-user={{adminUser}}>
<div id="certificate-table" class="hidden" data-user={{adminUser}}>
<table class="table table-striped table-hover list-table display responsive nowrap data-table grid-view"
id="certificate-grid">
<thead>

@ -142,12 +142,13 @@ function loadCertificates(searchParam) {
}
if (viewModel.certificates.length > 0) {
$('#certificate-table').removeClass('hidden');
$('#ast-container').removeClass('hidden');
$('#certificate-listing-status-msg').text("");
var content = template(viewModel);
$("#ast-container").html(content);
} else {
$('#ast-container').addClass('hidden');
$('#certificate-table').addClass('hidden');
$('#certificate-listing-status-msg').text('No certificate is available to be displayed.');
$('#certificate-listing-status').removeClass('hidden');
}

@ -31,7 +31,7 @@
{{/if}}
<div class="panel-body">
<form id="signInForm" method="POST" action="{{@app.context}}/uuf/login">
<form id="signInForm" method="POST" action="{{loginActionUrl}}">
<div class="form-group">
<label for="username">Username *</label>
<input type="text" name="username" class="form-control" placeholder="Enter your username"
@ -42,6 +42,9 @@
<input type="password" name="password" class="form-control" placeholder="Enter your password"
required="required" />
</div>
{{#if sessionDataKey}}
<input type="hidden" name="sessionDataKey" value="{{sessionDataKey}}" />
{{/if}}
{{#if referer}}
<input type="hidden" name="referer" value="{{referer}}" />
{{/if}}

@ -0,0 +1,28 @@
function onRequest(context) {
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var authModuleConfigs = context.app.conf["authModule"];
var sessionDataKey = request.getParameter("sessionDataKey");
//if sso enabled and sessionDataKey is empty redirect
var ssoConfigs = authModuleConfigs["sso"];
if (ssoConfigs && (ssoConfigs["enabled"].toString() == "true") && !sessionDataKey) {
// SSO is enabled in Auth module.
var redirectUri = context.app.context + "/uuf/login";
var queryString = request.getQueryString();
if (queryString && (queryString.length > 0)) {
redirectUri = redirectUri + "?" + queryString;
}
response.sendRedirect(encodeURI(redirectUri));
exit();
}
var viewModel = {};
var loginActionUrl = context.app.context + "/uuf/login";
if (sessionDataKey) {
loginActionUrl = devicemgtProps["httpsURL"] + "/commonauth";
}
viewModel.sessionDataKey = sessionDataKey;
viewModel.loginActionUrl = loginActionUrl;
return viewModel;
}

@ -1,5 +1,6 @@
{
"version": "1.0.0",
"layout": "uuf.layout.sign-in",
"uri": "/login",
"extends": "uuf.page.sign-in"
"isAnonymous": true
}

@ -51,7 +51,10 @@
var operationsLogTable = "#operations-log-table";
if (update) {
operationTable = $(operationsLogTable).DataTable();
operationTable.ajax.reload(false);
$("#operations-spinner").removeClass("hidden");
operationTable.ajax.reload(function ( json ) {
$("#operations-spinner").addClass("hidden");
}, false);
return;
}
operationTable = $(operationsLogTable).datatables_extended({
@ -142,53 +145,54 @@
function (template) {
var getEffectivePolicyURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId + "/effective-policy";
var getDeviceComplianceURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId + "/compliance-data";
invokerUtil.get(
getEffectivePolicyURL,
// success-callback
function (data, textStatus, jqXHR) {
if (jqXHR.status == 200 && data) {
data = JSON.parse(data);
if (jqXHR.status == 200) {
$("#policy-spinner").addClass("hidden");
if (data["active"] == true) {
activePolicy = data;
invokerUtil.get(
getDeviceComplianceURL,
// success-callback
function (data, textStatus, jqXHR) {
if (jqXHR.status == 200 && data) {
var viewModel = {};
viewModel["policy"] = activePolicy;
viewModel["deviceType"] = deviceType;
data = JSON.parse(data);
var content;
if (data["complianceData"]) {
if (data["complianceData"]["complianceFeatures"] &&
data["complianceData"]["complianceFeatures"].length > 0) {
viewModel["compliance"] = "NON-COMPLIANT";
viewModel["complianceFeatures"] = data["complianceData"]["complianceFeatures"];
content = template(viewModel);
$("#policy-list-container").html(content);
if(data){
data = JSON.parse(data);
if (data["active"] == true) {
activePolicy = data;
invokerUtil.get(
getDeviceComplianceURL,
// success-callback
function (data, textStatus, jqXHR) {
if (jqXHR.status == 200 && data) {
var viewModel = {};
viewModel["policy"] = activePolicy;
viewModel["deviceType"] = deviceType;
data = JSON.parse(data);
var content;
if (data["complianceData"]) {
if (data["complianceData"]["complianceFeatures"] &&
data["complianceData"]["complianceFeatures"].length > 0) {
viewModel["compliance"] = "NON-COMPLIANT";
viewModel["complianceFeatures"] = data["complianceData"]["complianceFeatures"];
content = template(viewModel);
$("#policy-list-container").html(content);
} else {
viewModel["compliance"] = "COMPLIANT";
content = template(viewModel);
$("#policy-list-container").html(content);
$("#policy-compliance-table").addClass("hidden");
}
} else {
viewModel["compliance"] = "COMPLIANT";
content = template(viewModel);
$("#policy-list-container").html(content);
$("#policy-compliance-table").addClass("hidden");
$("#policy-list-container").
html("<div class='panel-body'><br><p class='fw-warning'> This device " +
"has no policy applied.<p></div>");
}
} else {
$("#policy-list-container").
html("<div class='panel-body'><br><p class='fw-warning'> This device " +
"has no policy applied.<p></div>");
}
},
// error-callback
function () {
$("#policy-list-container").
html("<div class='panel-body'><br><p class='fw-warning'> Loading policy compliance related data " +
"was not successful. please try refreshing data in a while.<p></div>");
}
},
// error-callback
function () {
$("#policy-list-container").
html("<div class='panel-body'><br><p class='fw-warning'> Loading policy compliance related data " +
"was not successful. please try refreshing data in a while.<p></div>");
}
);
);
}
}
}
},

@ -283,23 +283,29 @@
<div id="policy-platform-main-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
{{#unless types}}
<h3><i class="icon fw fw-warning"></i> No compatible device types have been installed.
Install device types to add policies.</h3>
{{/unless}}
<div class="row wr-tile-buttons-list">
<div class="wr-input-control">
<ul class="tile-buttons row">
{{#each types}}
<li class="col-xs-12 col-sm-12 col-md-4 col-lg-4"
style="margin-top: 5px; margin-bottom: 5px;">
<a href="javascript:void(0)"
class="{{name}}-platform wizard-stepper"
data-current="policy-platform"
data-next="policy-profile"
data-platform="{{name}}"
data-validate="false">
<img src="{{icon}}" width="50px" height="50px"><br><br>
<b>{{label}}</b>
</a>
</li>
{{/each}}
{{#if types}}
{{#each types}}
<li class="col-xs-12 col-sm-12 col-md-4 col-lg-4"
style="margin-top: 5px; margin-bottom: 5px;">
<a href="javascript:void(0)"
class="{{name}}-platform wizard-stepper"
data-current="policy-platform"
data-next="policy-profile"
data-platform="{{name}}"
data-validate="false">
<img src="{{icon}}" width="50px" height="50px"><br><br>
<b>{{label}}</b>
</a>
</li>
{{/each}}
{{/if}}
</ul>
</div>
</div>

@ -0,0 +1,142 @@
/*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var policy = {};
var displayPolicy = function (policyPayloadObj) {
policy["name"] = policyPayloadObj["policyName"];
policy["platform"] = policyPayloadObj["profile"]["deviceType"];
// updating next-page wizard title with selected platform
$("#policy-heading").text(policy["platform"].toUpperCase() + " POLICY - " + policy["name"].toUpperCase());
$("#policy-platform").text(policy["platform"].toUpperCase());
$("#policy-assignment").text(policyPayloadObj.deviceGroups);
$("#policy-action").text(policyPayloadObj.compliance.toUpperCase());
$("#policy-description").text(policyPayloadObj["description"]);
var policyStatus = "Active";
if (policyPayloadObj["active"] == true && policyPayloadObj["updated"] == true) {
policyStatus = '<i class="fw fw-warning icon-success"></i> Active/Updated</span>';
} else if (policyPayloadObj["active"] == true && policyPayloadObj["updated"] == false) {
policyStatus = '<i class="fw fw-ok icon-success"></i> Active</span>';
} else if (policyPayloadObj["active"] == false && policyPayloadObj["updated"] == true) {
policyStatus = '<i class="fw fw-warning icon-warning"></i> Inactive/Updated</span>';
} else if (policyPayloadObj["active"] == false && policyPayloadObj["updated"] == false) {
policyStatus = '<i class="fw fw-error icon-danger"></i> Inactive</span>';
}
$("#policy-status").html(policyStatus);
if (policyPayloadObj.users.length > 0) {
$("#policy-users").text(policyPayloadObj.users.toString().split(",").join(", "));
} else {
$("#users-row").addClass("hidden");
}
if (policyPayloadObj.deviceGroups.length > 0) {
debugger;
var deviceGroups = policyPayloadObj.deviceGroups;
var assignedGroups = [];
for (var index in deviceGroups) {
if (deviceGroups.hasOwnProperty(index)) {
assignedGroups.push(deviceGroups[index].name);
}
}
$("#policy-groups").text(assignedGroups.toString().split(",").join(", "));
} else {
$("#policy-groups").text("NONE");
}
if (policyPayloadObj.roles.length > 0) {
$("#policy-roles").text(policyPayloadObj.roles.toString().split(",").join(", "));
} else {
$("#roles-row").addClass("hidden");
}
var deviceType = policy["platform"];
var policyOperationsTemplateSrc = context + '/public/cdmf.unit.device.type.' + deviceType +
'.policy-view/templates/' + deviceType + '-policy-view.hbs';
var policyOperationsScriptSrc = context + '/public/cdmf.unit.device.type.' + deviceType +
'.policy-view/js/' + deviceType + '-policy-view.js';
var policyOperationsStylesSrc = context + '/public/cdmf.unit.device.type.' + deviceType +
'.policy-view/css/' + deviceType + '-policy-view.css';
var policyOperationsTemplateCacheKey = deviceType + '-policy-operations';
$.isResourceExists(policyOperationsTemplateSrc, function (status) {
if (status) {
$.template(policyOperationsTemplateCacheKey, policyOperationsTemplateSrc, function (template) {
var content = template();
$("#device-type-policy-operations").html(content).removeClass("hidden");
$(".policy-platform").addClass("hidden");
$.isResourceExists(policyOperationsScriptSrc, function (status) {
if (status) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = policyOperationsScriptSrc;
$(".wr-advance-operations").prepend(script);
var previouslyConfiguredOperations = operationModule.populateProfile(policy["platform"],
policyPayloadObj["profile"]["profileFeaturesList"]);
polulateProfileOperations(previouslyConfiguredOperations);
}
});
});
$.isResourceExists(policyOperationsStylesSrc, function (status) {
if (status) {
var style = document.createElement('link');
style.type = 'text/css';
style.rel = 'stylesheet';
style.href = policyOperationsStylesSrc;
$(".wr-advance-operations").prepend(style);
}
});
} else {
$("#generic-policy-operations").removeClass("hidden");
}
$(".wr-advance-operations-init").addClass("hidden");
});
};
/**
* This method will return query parameter value given its name.
* @param name Query parameter name
* @returns {string} Query parameter value
*/
var getParameterByName = function (name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
};
$(document).ready(function () {
var policyPayloadObj;
// Adding initial state of wizard-steps.
invokerUtil.get(
"/api/device-mgt/v1.0/policies/" + getParameterByName("id"),
// on success
function (data, textStatus, jqXHR) {
if (jqXHR.status == 200 && data) {
policyPayloadObj = JSON.parse(data);
displayPolicy(policyPayloadObj);
}
},
// on error
function (jqXHR) {
console.log(jqXHR);
// should be redirected to an error page
}
);
});

@ -24,8 +24,8 @@
<td id="policy-platform" style="padding:10px 15px;"></td>
</tr>
<tr role="row" class="odd">
<td class="sorting_1" style="padding:10px 15px;">Ownership</td>
<td id="policy-assignment" style="padding:10px 15px;"></td>
<td class="sorting_1" style="padding:10px 15px;">Groups</td>
<td id="policy-groups" style="padding:10px 15px;"></td>
</tr>
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Action upon non-compliance</td>
@ -60,12 +60,17 @@
<i class="icon fw fw-error"></i><span></span>
</div>
<div class="wr-advance-operations">
<div class="wr-advance-operations-init">
<br>
<i class="fw fw-settings fw-spin fw-2x"></i>
Loading platform features . . .
<br>
<br>
<div class='wr-advance-operations-init'>
<br/>
<i class='fw fw-settings fw-spin fw-2x'></i>
Loading Platform Features . . .
<br/>
<br/>
</div>
<div id="device-type-policy-operations" class="hidden">
</div>
<div id="generic-policy-operations" class="hidden">
{{unit "cdmf.unit.device.type.generic.policy-wizard"}}
</div>
</div>
</div>
@ -82,15 +87,5 @@
{{/if}}
{{/zone}}
{{#zone "bottomJs"}}
<!--suppress HtmlUnknownTarget -->
<script id="hidden-operations-ios" src="{{@unit.publicUri}}/templates/hidden-operations-ios.hbs"
type="text/x-handlebars-template"></script>
<!--suppress HtmlUnknownTarget -->
<script id="hidden-operations-android" src="{{@unit.publicUri}}/templates/hidden-operations-android.hbs"
type="text/x-handlebars-template"></script>
<!--suppress HtmlUnknownTarget -->
<script id="hidden-operations-windows" src="{{@unit.publicUri}}/templates/hidden-operations-windows.hbs"
type="text/x-handlebars-template"></script>
{{js "js/view.js"}}
{{/zone}}
{{/zone}}

@ -55,5 +55,52 @@
"url": "/api/operation/*",
"path": "/api/operation-api.jag"
}
]
],
"filters": [
{
"name": "URLBasedCachePreventionFilter",
"class": "org.wso2.carbon.ui.filters.cache.URLBasedCachePreventionFilter"
},
{
"name":"HttpHeaderSecurityFilter",
"class":"org.apache.catalina.filters.HttpHeaderSecurityFilter",
"params" : [{"name" : "hstsEnabled", "value" : "false"}]
}
],
"filterMappings": [
{
"name": "URLBasedCachePreventionFilter",
"url": "/api/*"
},
{
"name":"HttpHeaderSecurityFilter",
"url":"*"
}
],
"listeners" : [
{
"class" : "org.owasp.csrfguard.CsrfGuardServletContextListener"
},
{
"class" : "org.owasp.csrfguard.CsrfGuardHttpSessionListener"
}
],
"servlets" : [
{
"name" : "JavaScriptServlet",
"class" : "org.owasp.csrfguard.servlet.JavaScriptServlet"
}
],
"servletMappings" : [
{
"name" : "JavaScriptServlet",
"url" : "/csrf.js"
}
],
"contextParams" : [
{
"name" : "Owasp.CsrfGuard.Config",
"value" : "/repository/conf/security/Owasp.CsrfGuard.Carbon.properties"
}
]
}

@ -78,12 +78,12 @@ var responsiveTextRatio = 0.2,
* A function to add data attributes to HTML about the user agent
* @return {Null}
*/
$.browser_meta = function(){
$('html')
.attr('data-useragent', navigator.userAgent)
.attr('data-platform', navigator.platform)
.addClass(((!!('ontouchstart' in window) || !!('onmsgesturechange' in window)) ? ' touch' : ''));
};
$.browser_meta = function(){
$('html')
.attr('data-useragent', navigator.userAgent)
.attr('data-platform', navigator.platform)
.addClass(((!!('ontouchstart' in window) || !!('onmsgesturechange' in window)) ? ' touch' : ''));
};
/**
* @description Data Loader function
@ -96,17 +96,17 @@ var responsiveTextRatio = 0.2,
var loadingText = ($(this).attr('data-loading-text') === undefined) ? 'LOADING' : $(this).attr('data-loading-text');
var html = '<div class="loading-animation">' +
'<div class="logo">' +
'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"' +
'viewBox="0 0 14 14" enable-background="new 0 0 14 14" xml:space="preserve">' +
'<path class="circle" stroke-width="1.4" stroke-miterlimit="10" d="M6.534,0.748C7.546,0.683,8.578,0.836,9.508,1.25 c1.903,0.807,3.339,2.615,3.685,4.654c0.244,1.363,0.028,2.807-0.624,4.031c-0.851,1.635-2.458,2.852-4.266,3.222 c-1.189,0.25-2.45,0.152-3.583-0.289c-1.095-0.423-2.066-1.16-2.765-2.101C1.213,9.78,0.774,8.568,0.718,7.335 C0.634,5.866,1.094,4.372,1.993,3.207C3.064,1.788,4.76,0.867,6.534,0.748z"/>' +
'<path class="pulse-line" stroke-width="0.55" stroke-miterlimit="10" d="M12.602,7.006c-0.582-0.001-1.368-0.001-1.95,0 c-0.491,0.883-0.782,1.4-1.278,2.28C8.572,7.347,7.755,5.337,6.951,3.399c-0.586,1.29-1.338,3.017-1.923,4.307 c-1.235,0-2.38-0.002-3.615,0"/>' +
'</svg>' +
'<div class="signal"></div>' +
'</div>' +
'<p>'+ loadingText +'</p>' +
'</div>' +
'<div class="loading-bg"></div>';
'<div class="logo">' +
'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"' +
'viewBox="0 0 14 14" enable-background="new 0 0 14 14" xml:space="preserve">' +
'<path class="circle" stroke-width="1.4" stroke-miterlimit="10" d="M6.534,0.748C7.546,0.683,8.578,0.836,9.508,1.25 c1.903,0.807,3.339,2.615,3.685,4.654c0.244,1.363,0.028,2.807-0.624,4.031c-0.851,1.635-2.458,2.852-4.266,3.222 c-1.189,0.25-2.45,0.152-3.583-0.289c-1.095-0.423-2.066-1.16-2.765-2.101C1.213,9.78,0.774,8.568,0.718,7.335 C0.634,5.866,1.094,4.372,1.993,3.207C3.064,1.788,4.76,0.867,6.534,0.748z"/>' +
'<path class="pulse-line" stroke-width="0.55" stroke-miterlimit="10" d="M12.602,7.006c-0.582-0.001-1.368-0.001-1.95,0 c-0.491,0.883-0.782,1.4-1.278,2.28C8.572,7.347,7.755,5.337,6.951,3.399c-0.586,1.29-1.338,3.017-1.923,4.307 c-1.235,0-2.38-0.002-3.615,0"/>' +
'</svg>' +
'<div class="signal"></div>' +
'</div>' +
'<p>'+ loadingText +'</p>' +
'</div>' +
'<div class="loading-bg"></div>';
if (action === 'show') {
$(this).prepend(html).addClass('loading');
@ -230,13 +230,13 @@ var responsiveTextRatio = 0.2,
responsive: false,
autoWidth: false,
dom:'<"dataTablesTop"' +
'f' +
'<"dataTables_toolbar">' +
'>' +
'rt' +
'<"dataTablesBottom"' +
'lip' +
'>',
'f' +
'<"dataTables_toolbar">' +
'>' +
'rt' +
'<"dataTablesBottom"' +
'lip' +
'>',
language: {
searchPlaceholder: 'Filter by ...',
search: ''
@ -244,6 +244,7 @@ var responsiveTextRatio = 0.2,
initComplete: function(){
var ROW_SELECTED_CLASS = 'DTTT_selected';
var table = this;
this.api().columns().every(function(){
@ -301,7 +302,7 @@ var responsiveTextRatio = 0.2,
var search_input = $(this).closest('.dataTables_wrapper').find('div[id$=_filter] input');
search_input.before('<i class="fw fw-search search-icon"></i>').removeClass('input-sm');
// Create sorting dropdown menu for list table advance operations
// Create sorting dropdown menu for list table advance operations
var dropdownmenu = $('<ul class="dropdown-menu arrow arrow-top-right dark sort-list add-margin-top-2x"><li class="dropdown-header">Sort by</li></ul>');
$('.sort-row th', elem).each(function(){
if(!$(this).hasClass('no-sort')){
@ -313,19 +314,19 @@ var responsiveTextRatio = 0.2,
if (!table.hasClass('no-toolbar')) {
if (table.hasClass('sorting-enabled')) {
return '<ul class="nav nav-pills navbar-right remove-margin" role="tablist">' +
'<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' +
'<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>' +
'<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' +
'<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' +
'<li><button class="btn btn-default" data-toggle="dropdown"><i class="fw fw-sort"></i></button>' + dropdownmenu[0].outerHTML + '</li>' +
'</ul>'
'<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' +
'<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>' +
'<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' +
'<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' +
'<li><button class="btn btn-default" data-toggle="dropdown"><i class="fw fw-sort"></i></button>' + dropdownmenu[0].outerHTML + '</li>' +
'</ul>'
} else {
return '<ul class="nav nav-pills navbar-right remove-margin" role="tablist">' +
'<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' +
'<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>' +
'<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' +
'<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' +
'</ul>'
'<li><button data-click-event="toggle-selectable" class="btn btn-default btn-primary select-enable-btn">Select</li>' +
'<li><button data-click-event="toggle-selected" id="dt-select-all" class="btn btn-default btn-primary disabled">Select All</li>' +
'<li><button data-click-event="toggle-list-view" data-view="grid" class="btn btn-default"><i class="fw fw-grid"></i></button></li>' +
'<li><button data-click-event="toggle-list-view" data-view="list" class="btn btn-default"><i class="fw fw-list"></i></button></li>' +
'</ul>'
}
} else {
return '';
@ -335,9 +336,11 @@ var responsiveTextRatio = 0.2,
/**
* append advance operations to list table toolbar
*/
$('.dataTable.list-table').closest('.dataTables_wrapper').find('.dataTablesTop .dataTables_toolbar').html(
if (table.hasClass('dataTables_toolbar')) {
$('.dataTable.list-table').closest('.dataTables_wrapper').find('.dataTablesTop .dataTables_toolbar').html(
getAdvanceToolBar()
);
);
}
//Sorting dropdown menu select function
$('.dataTables_wrapper .sort-list li a').click(function() {

@ -1808,7 +1808,7 @@
<tomcat.jdbc.pooling.version>7.0.34.wso2v2</tomcat.jdbc.pooling.version>
<!-- Carbon Deployment -->
<carbon.deployment.version>4.7.0</carbon.deployment.version>
<carbon.deployment.version>4.7.2</carbon.deployment.version>
<!-- Carbon Identity -->
<carbon.identity.framework.version>5.2.2</carbon.identity.framework.version>
@ -1816,10 +1816,10 @@
<identity.inbound.auth.saml.version>5.1.1</identity.inbound.auth.saml.version>
<!-- Carbon Multi-tenancy -->
<carbon.multitenancy.version>4.6.0</carbon.multitenancy.version>
<carbon.multitenancy.version>4.6.1</carbon.multitenancy.version>
<!-- Carbon Governance -->
<carbon.governance.version>4.6.4</carbon.governance.version>
<carbon.governance.version>4.6.5</carbon.governance.version>
<!-- Axiom -->
<axiom.version>1.2.11-wso2v10</axiom.version>
@ -1845,7 +1845,7 @@
<carbon.analytics.common.version.range>[5.1.3,6.0.0)</carbon.analytics.common.version.range>
<!-- Carbon Registry -->
<carbon.registry.version>4.5.6</carbon.registry.version>
<carbon.registry.version>4.5.8</carbon.registry.version>
<carbon.registry.imp.pkg.version.range>[4.4.8, 5.0.0)</carbon.registry.imp.pkg.version.range>
<!--CXF properties-->

Loading…
Cancel
Save