Example #1
0
    /// <summary>
    /// Gets the debug action for the thread.
    /// </summary>
    /// <param name="requestGuid">Request GUID for the debug</param>
    protected string GetDebugAction(object requestGuid)
    {
        string result = null;

        if (DebugHelper.AnyDebugEnabled)
        {
            var rGuid = ValidationHelper.GetGuid(requestGuid, Guid.Empty);
            if (rGuid != Guid.Empty)
            {
                var logs = DebugHelper.FindRequestLogs(rGuid);
                if (logs != null)
                {
                    string url = LogControl.GetLogsUrl(rGuid);

                    var button = new CMSGridActionButton
                    {
                        IconCssClass  = "icon-bug",
                        IconStyle     = GridIconStyle.Allow,
                        ToolTip       = GetString("General.Debug"),
                        OnClientClick = "modalDialog('" + url + "', 'ThreadDebug'); return false;"
                    };

                    result = button.GetRenderedHTML();
                }
            }
        }

        return(result);
    }