Improved: Removed semicolon from all Groovy files of all components.
(OFBIZ-8652) Thanks: Rohit Koushal, Jacques Le Roux and Rishi Solanki for the contribution. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1767764 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+30
-30
@@ -16,42 +16,42 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.ofbiz.base.util.cache.UtilCache;
|
||||
import org.apache.ofbiz.base.util.cache.CacheLine;
|
||||
import org.apache.ofbiz.base.util.UtilFormatOut;
|
||||
import org.apache.ofbiz.security.Security;
|
||||
import org.apache.ofbiz.base.util.cache.UtilCache
|
||||
import org.apache.ofbiz.base.util.cache.CacheLine
|
||||
import org.apache.ofbiz.base.util.UtilFormatOut
|
||||
import org.apache.ofbiz.security.Security
|
||||
|
||||
cacheName = parameters.UTIL_CACHE_NAME;
|
||||
context.cacheName = cacheName;
|
||||
cacheName = parameters.UTIL_CACHE_NAME
|
||||
context.cacheName = cacheName
|
||||
|
||||
if (cacheName) {
|
||||
utilCache = UtilCache.findCache(cacheName);
|
||||
utilCache = UtilCache.findCache(cacheName)
|
||||
if (utilCache) {
|
||||
cache = [:];
|
||||
cache = [:]
|
||||
|
||||
cache.cacheName = utilCache.getName();
|
||||
cache.cacheSize = UtilFormatOut.formatQuantity(utilCache.size());
|
||||
cache.hitCount = UtilFormatOut.formatQuantity(utilCache.getHitCount());
|
||||
cache.missCountTot = UtilFormatOut.formatQuantity(utilCache.getMissCountTotal());
|
||||
cache.missCountNotFound = UtilFormatOut.formatQuantity(utilCache.getMissCountNotFound());
|
||||
cache.missCountExpired = UtilFormatOut.formatQuantity(utilCache.getMissCountExpired());
|
||||
cache.missCountSoftRef = UtilFormatOut.formatQuantity(utilCache.getMissCountSoftRef());
|
||||
cache.removeHitCount = UtilFormatOut.formatQuantity(utilCache.getRemoveHitCount());
|
||||
cache.removeMissCount = UtilFormatOut.formatQuantity(utilCache.getRemoveMissCount());
|
||||
cache.maxInMemory = UtilFormatOut.formatQuantity(utilCache.getMaxInMemory());
|
||||
cache.expireTime = UtilFormatOut.formatQuantity(utilCache.getExpireTime());
|
||||
cache.useSoftReference = utilCache.getUseSoftReference().toString();
|
||||
cache.cacheName = utilCache.getName()
|
||||
cache.cacheSize = UtilFormatOut.formatQuantity(utilCache.size())
|
||||
cache.hitCount = UtilFormatOut.formatQuantity(utilCache.getHitCount())
|
||||
cache.missCountTot = UtilFormatOut.formatQuantity(utilCache.getMissCountTotal())
|
||||
cache.missCountNotFound = UtilFormatOut.formatQuantity(utilCache.getMissCountNotFound())
|
||||
cache.missCountExpired = UtilFormatOut.formatQuantity(utilCache.getMissCountExpired())
|
||||
cache.missCountSoftRef = UtilFormatOut.formatQuantity(utilCache.getMissCountSoftRef())
|
||||
cache.removeHitCount = UtilFormatOut.formatQuantity(utilCache.getRemoveHitCount())
|
||||
cache.removeMissCount = UtilFormatOut.formatQuantity(utilCache.getRemoveMissCount())
|
||||
cache.maxInMemory = UtilFormatOut.formatQuantity(utilCache.getMaxInMemory())
|
||||
cache.expireTime = UtilFormatOut.formatQuantity(utilCache.getExpireTime())
|
||||
cache.useSoftReference = utilCache.getUseSoftReference().toString()
|
||||
|
||||
exp = utilCache.getExpireTime();
|
||||
hrs = Math.floor(exp / (60 * 60 * 1000));
|
||||
exp = exp % (60 * 60 * 1000);
|
||||
mins = Math.floor(exp / (60 * 1000));
|
||||
exp = exp % (60 * 1000);
|
||||
secs = exp / 1000;
|
||||
cache.hrs = hrs;
|
||||
cache.mins = mins;
|
||||
cache.secs = UtilFormatOut.formatPrice(secs);
|
||||
exp = utilCache.getExpireTime()
|
||||
hrs = Math.floor(exp / (60 * 60 * 1000))
|
||||
exp = exp % (60 * 60 * 1000)
|
||||
mins = Math.floor(exp / (60 * 1000))
|
||||
exp = exp % (60 * 1000)
|
||||
secs = exp / 1000
|
||||
cache.hrs = hrs
|
||||
cache.mins = mins
|
||||
cache.secs = UtilFormatOut.formatPrice(secs)
|
||||
|
||||
context.cache = cache;
|
||||
context.cache = cache
|
||||
}
|
||||
}
|
||||
|
||||
+37
-37
@@ -16,49 +16,49 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.ofbiz.base.util.cache.UtilCache;
|
||||
import org.apache.ofbiz.base.util.UtilFormatOut;
|
||||
import org.apache.ofbiz.base.util.UtilMisc;
|
||||
import org.apache.ofbiz.security.Security;
|
||||
import org.apache.ofbiz.base.util.cache.UtilCache
|
||||
import org.apache.ofbiz.base.util.UtilFormatOut
|
||||
import org.apache.ofbiz.base.util.UtilMisc
|
||||
import org.apache.ofbiz.security.Security
|
||||
|
||||
context.hasUtilCacheEdit = security.hasEntityPermission("UTIL_CACHE", "_EDIT", session);
|
||||
context.hasUtilCacheEdit = security.hasEntityPermission("UTIL_CACHE", "_EDIT", session)
|
||||
|
||||
cacheList = [];
|
||||
totalCacheMemory = 0.0;
|
||||
names = new TreeSet(UtilCache.getUtilCacheTableKeySet());
|
||||
cacheList = []
|
||||
totalCacheMemory = 0.0
|
||||
names = new TreeSet(UtilCache.getUtilCacheTableKeySet())
|
||||
names.each { cacheName ->
|
||||
utilCache = UtilCache.findCache(cacheName);
|
||||
cache = [:];
|
||||
utilCache = UtilCache.findCache(cacheName)
|
||||
cache = [:]
|
||||
|
||||
cache.cacheName = utilCache.getName();
|
||||
cache.cacheSize = UtilFormatOut.formatQuantity(utilCache.size());
|
||||
cache.hitCount = UtilFormatOut.formatQuantity(utilCache.getHitCount());
|
||||
cache.missCountTot = UtilFormatOut.formatQuantity(utilCache.getMissCountTotal());
|
||||
cache.missCountNotFound = UtilFormatOut.formatQuantity(utilCache.getMissCountNotFound());
|
||||
cache.missCountExpired = UtilFormatOut.formatQuantity(utilCache.getMissCountExpired());
|
||||
cache.missCountSoftRef = UtilFormatOut.formatQuantity(utilCache.getMissCountSoftRef());
|
||||
cache.removeHitCount = UtilFormatOut.formatQuantity(utilCache.getRemoveHitCount());
|
||||
cache.removeMissCount = UtilFormatOut.formatQuantity(utilCache.getRemoveMissCount());
|
||||
cache.maxInMemory = UtilFormatOut.formatQuantity(utilCache.getMaxInMemory());
|
||||
cache.expireTime = UtilFormatOut.formatQuantity(utilCache.getExpireTime());
|
||||
cache.useSoftReference = utilCache.getUseSoftReference().toString();
|
||||
cache.cacheMemory = utilCache.getSizeInBytes();
|
||||
totalCacheMemory += cache.cacheMemory;
|
||||
cacheList.add(cache);
|
||||
cache.cacheName = utilCache.getName()
|
||||
cache.cacheSize = UtilFormatOut.formatQuantity(utilCache.size())
|
||||
cache.hitCount = UtilFormatOut.formatQuantity(utilCache.getHitCount())
|
||||
cache.missCountTot = UtilFormatOut.formatQuantity(utilCache.getMissCountTotal())
|
||||
cache.missCountNotFound = UtilFormatOut.formatQuantity(utilCache.getMissCountNotFound())
|
||||
cache.missCountExpired = UtilFormatOut.formatQuantity(utilCache.getMissCountExpired())
|
||||
cache.missCountSoftRef = UtilFormatOut.formatQuantity(utilCache.getMissCountSoftRef())
|
||||
cache.removeHitCount = UtilFormatOut.formatQuantity(utilCache.getRemoveHitCount())
|
||||
cache.removeMissCount = UtilFormatOut.formatQuantity(utilCache.getRemoveMissCount())
|
||||
cache.maxInMemory = UtilFormatOut.formatQuantity(utilCache.getMaxInMemory())
|
||||
cache.expireTime = UtilFormatOut.formatQuantity(utilCache.getExpireTime())
|
||||
cache.useSoftReference = utilCache.getUseSoftReference().toString()
|
||||
cache.cacheMemory = utilCache.getSizeInBytes()
|
||||
totalCacheMemory += cache.cacheMemory
|
||||
cacheList.add(cache)
|
||||
}
|
||||
sortField = parameters.sortField;
|
||||
sortField = parameters.sortField
|
||||
if (sortField) {
|
||||
context.cacheList = UtilMisc.sortMaps(cacheList, UtilMisc.toList(sortField));
|
||||
context.cacheList = UtilMisc.sortMaps(cacheList, UtilMisc.toList(sortField))
|
||||
} else {
|
||||
context.cacheList = cacheList;
|
||||
context.cacheList = cacheList
|
||||
}
|
||||
context.totalCacheMemory = totalCacheMemory;
|
||||
context.totalCacheMemory = totalCacheMemory
|
||||
|
||||
rt = Runtime.getRuntime();
|
||||
memoryInfo = [:];
|
||||
memoryInfo.memory = UtilFormatOut.formatQuantity(rt.totalMemory());
|
||||
memoryInfo.freeMemory = UtilFormatOut.formatQuantity(rt.freeMemory());
|
||||
memoryInfo.usedMemory = UtilFormatOut.formatQuantity((rt.totalMemory() - rt.freeMemory()));
|
||||
memoryInfo.maxMemory = UtilFormatOut.formatQuantity(rt.maxMemory());
|
||||
memoryInfo.totalCacheMemory = totalCacheMemory;
|
||||
context.memoryInfo = memoryInfo;
|
||||
rt = Runtime.getRuntime()
|
||||
memoryInfo = [:]
|
||||
memoryInfo.memory = UtilFormatOut.formatQuantity(rt.totalMemory())
|
||||
memoryInfo.freeMemory = UtilFormatOut.formatQuantity(rt.freeMemory())
|
||||
memoryInfo.usedMemory = UtilFormatOut.formatQuantity((rt.totalMemory() - rt.freeMemory()))
|
||||
memoryInfo.maxMemory = UtilFormatOut.formatQuantity(rt.maxMemory())
|
||||
memoryInfo.totalCacheMemory = totalCacheMemory
|
||||
context.memoryInfo = memoryInfo
|
||||
|
||||
@@ -16,38 +16,38 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.ofbiz.base.util.cache.UtilCache;
|
||||
import org.apache.ofbiz.base.util.cache.CacheLine;
|
||||
import org.apache.ofbiz.base.util.UtilFormatOut;
|
||||
import org.apache.ofbiz.base.util.UtilMisc;
|
||||
import org.apache.ofbiz.security.Security;
|
||||
import org.apache.ofbiz.base.util.cache.UtilCache
|
||||
import org.apache.ofbiz.base.util.cache.CacheLine
|
||||
import org.apache.ofbiz.base.util.UtilFormatOut
|
||||
import org.apache.ofbiz.base.util.UtilMisc
|
||||
import org.apache.ofbiz.security.Security
|
||||
|
||||
context.hasUtilCacheEdit = security.hasEntityPermission("UTIL_CACHE", "_EDIT", session);
|
||||
context.hasUtilCacheEdit = security.hasEntityPermission("UTIL_CACHE", "_EDIT", session)
|
||||
|
||||
cacheName = parameters.UTIL_CACHE_NAME;
|
||||
context.cacheName = cacheName;
|
||||
context.now = (new Date()).toString();
|
||||
cacheName = parameters.UTIL_CACHE_NAME
|
||||
context.cacheName = cacheName
|
||||
context.now = (new Date()).toString()
|
||||
|
||||
totalSize = 0;
|
||||
totalSize = 0
|
||||
|
||||
cacheElementsList = [];
|
||||
cacheElementsList = []
|
||||
if (cacheName) {
|
||||
utilCache = UtilCache.findCache(cacheName);
|
||||
utilCache = UtilCache.findCache(cacheName)
|
||||
if (utilCache) {
|
||||
cacheElementsList = utilCache.getLineInfos()
|
||||
cacheElementsList.each {
|
||||
if (it.expireTimeMillis != null) {
|
||||
it.expireTimeMillis = (it.expireTimeMillis / 1000) .toString();
|
||||
it.expireTimeMillis = (it.expireTimeMillis / 1000) .toString()
|
||||
}
|
||||
totalSize += it.lineSize;
|
||||
it.lineSize = UtilFormatOut.formatQuantity(it.lineSize);
|
||||
totalSize += it.lineSize
|
||||
it.lineSize = UtilFormatOut.formatQuantity(it.lineSize)
|
||||
}
|
||||
}
|
||||
}
|
||||
context.totalSize = UtilFormatOut.formatQuantity(totalSize);
|
||||
sortField = parameters.sortField;
|
||||
context.totalSize = UtilFormatOut.formatQuantity(totalSize)
|
||||
sortField = parameters.sortField
|
||||
if (sortField) {
|
||||
context.cacheElementsList = UtilMisc.sortMaps(cacheElementsList, UtilMisc.toList(sortField));
|
||||
context.cacheElementsList = UtilMisc.sortMaps(cacheElementsList, UtilMisc.toList(sortField))
|
||||
} else {
|
||||
context.cacheElementsList = cacheElementsList;
|
||||
context.cacheElementsList = cacheElementsList
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user