Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Setup title
        CurrentMaster.Title.TitleText  = GetString("ViewRequest.Title");
        CurrentMaster.Title.TitleImage = GetImageUrl("Objects/__GLOBAL__/Object.png");

        guid = QueryHelper.GetGuid("guid", Guid.Empty);
        if (guid != Guid.Empty)
        {
            // Find the root log
            RequestLog log = CMSFunctions.FindRequestLog(guid);

            if (log != null)
            {
                // Setup the logs
                RequestLogs logs = log.ParentLogs;

                plcLogs.Controls.Add(new LiteralControl("<div><strong>&nbsp;" + logs.RequestURL + "</strong> (" + logs.RequestTime.ToString("hh:MM:ss") + ")</div><br />"));

                logFiles.Log  = logs.FilesLog;
                logCache.Log  = logs.CacheLog;
                logOutput.Log = logs.OutputLog;
                logSec.Log    = logs.SecurityLog;
                logMac.Log    = logs.MacrosLog;
                logSQL.Log    = logs.QueryLog;
                logState.Log  = logs.ViewStateLog;
                logReq.Log    = logs.RequestLog;
                logFarm.Log   = logs.WebFarmLog;
            }
        }
    }
    protected void btnClearCache_Click(object sender, EventArgs e)
    {
        CMSFunctions.ClearCache();

        lblInfo.Text = GetString("Administration-System.ClearCacheSuccess");

        ReloadData();
    }
    protected void btnClearCache_Click(object sender, EventArgs e)
    {
        CMSFunctions.ClearCache();

        ShowConfirmation(GetString("Administration-System.ClearCacheSuccess"));

        ReloadData();
    }
Example #4
0
    /// <summary>
    /// Saves the settings.
    /// </summary>
    private void SaveSettings()
    {
        SettingsGroupViewer.SaveChanges();

        // Special case for Debug category - debug settings have to be reloaded to take effect
        if (SettingsGroupViewer.CategoryName.ToLower() == "cms.system.debug")
        {
            CMSFunctions.ResetDebugSettings();
        }
        else if (SettingsGroupViewer.CategoryName.ToLower() == "cms.system.performance")
        {
            RequestHelper.ResetPerformanceSettings();
        }
    }
Example #5
0
    protected void btnClear_Click(object sender, EventArgs e)
    {
        CMSFunctions.ClearCache();

        ReloadData();
    }
Example #6
0
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        Visible = false;

        // Load the security log
        if (InitFromRequest)
        {
            ltlInfo.Visible = false;
            if (SettingsKeyProvider.DevelopmentMode)
            {
                Guid requestGuid = QueryHelper.GetGuid("requestguid", Guid.Empty);
                if (requestGuid != Guid.Empty)
                {
                    RequestLog log = CMSFunctions.FindRequestLog(requestGuid);
                    if (log != null)
                    {
                        var logs = log.ParentLogs;
                        if (logs != null)
                        {
                            Log = logs.SecurityLog;
                        }
                    }
                }
            }
            if (Log == null)
            {
                return;
            }
        }

        if (Log != null)
        {
            // Get the log table
            DataTable dt = Log.LogTable;
            if (!DataHelper.DataSourceIsEmpty(dt))
            {
                // Check the duplicity
                if (!dt.Columns.Contains("Duplicit"))
                {
                    DataHelper.MarkDuplicitRows(dt, "Indent <= 0", "Duplicit", "UserName", "SecurityOperation", "Resource", "Name", "SiteName");
                }

                Visible = true;

                int index = 1;
                gridSec.Columns[index++].HeaderText = GetString("SecurityLog.UserName");
                gridSec.Columns[index++].HeaderText = GetString("SecurityLog.Operation");
                gridSec.Columns[index++].HeaderText = GetString("SecurityLog.Result");
                gridSec.Columns[index++].HeaderText = GetString("SecurityLog.Resource");
                gridSec.Columns[index++].HeaderText = GetString("SecurityLog.Name");
                gridSec.Columns[index++].HeaderText = GetString("SecurityLog.Site");
                gridSec.Columns[index++].HeaderText = GetString("General.Context");

                if (DisplayHeader)
                {
                    ltlInfo.Text = "<div class=\"LogInfo\">" + GetString("SecurityLog.Info") + "</div>";
                }

                gridSec.DataSource = dt;
                gridSec.DataBind();
            }
        }
    }