1 var Ozone = Ozone || {}; 2 Ozone.util = Ozone.util || {}; 3 4 5 //uses Ext.msg.alert but forces the zseed in Ext.WindowMgr to a very high number (50,000) to force the alert on top of everything. 6 Ozone.util.alert = function(title, msg, fn, scope, options) { 7 var tmpZseed = Ext.WindowMgr.zseed; 8 Ext.WindowMgr.zseed = 50000; 9 Ozone.Msg.alert(title, msg, fn, scope, options); 10 Ext.WindowMgr.zseed = tmpZseed; 11 }; 12 13 Ozone.util.validateGuid = function(guid) { 14 if (guid == null) return false; 15 var match = guid.search(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/); 16 if (match < 0) return false; 17 return true; 18 }; 19 20 Ozone.util.validateDashboardJSON = function(json) { 21 // All dashboards have the same structure. 22 // None of the attributes can be undefined. 23 if (json.name == null || json.guid == null || json.isdefault == null) { 24 return false; 25 } 26 27 return true; 28 }; 29