您好,登錄后才能下訂單哦!
//script include ->SLADefinitionAJAX var SLADefinitionAJAX = Class.create(); SLADefinitionAJAX.prototype = Object.extendsObject(AbstractAjaxProcessor, { /** * Creates an example breach time message. * * @param sysparm_schedule String schedule id * @param sysparm_duration String duration * * @return String */ getExampleBreachTime: function() { var scheduleId = this.getParameter("sysparm_schedule"); var duration = this.getParameter("sysparm_duration"); if (!duration) return null; var startDate = new GlideDateTime(); var slaDef = new SLADefinition(); slaDef.setSchedule(scheduleId); slaDef.setDuration(duration); var endDate = slaDef.getExampleBreachTime(startDate); if (!endDate) return null; var dateDifference = endDate.getNumericValue() - startDate.getNumericValue(); var actualElapsedTime = new GlideDuration(dateDifference); return gs.getMessage("An SLA starting now will breach on {0} (Actual elapsed time: {1})", [ endDate.getDisplayValue(), actualElapsedTime.getDisplayValue() ]); }, type: 'SLADefinitionAJAX' });
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。