|
|
|
@ -250,13 +250,13 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
var config = this.AsyncDialog("Config", g =>
|
|
|
|
|
{
|
|
|
|
|
var from = new Web.UIFormDialog() { Title = "请求配置" };
|
|
|
|
|
from.AddTextarea("请求头配置", "HeaderConf", site.HeaderConf).PlaceHolder("字典配置格式").Put("Rows", 8);
|
|
|
|
|
from.AddTextarea("请求头配置", "HeaderConf", site.HeaderConf).PlaceHolder("字典配置格式").Put("Rows", 8).NotRequired();
|
|
|
|
|
from.AddPrompt("将会追加请求的Header上,当值为HOST、SCHEME、ADDRESS将会分别替换成当前值");
|
|
|
|
|
|
|
|
|
|
from.Submit("确认", "Site.Config");
|
|
|
|
|
return from;
|
|
|
|
|
});
|
|
|
|
|
var HostReConf = config["HeaderConf"];
|
|
|
|
|
var HostReConf = config["HeaderConf"] ?? String.Empty;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DataFactory.Instance().Put(new Site { Root = site.Root, HeaderConf = HostReConf });
|
|
|
|
@ -267,7 +267,7 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
var config = this.AsyncDialog("Config", g =>
|
|
|
|
|
{
|
|
|
|
|
var from = new Web.UIFormDialog() { Title = "内容转化配置" };
|
|
|
|
|
from.AddTextarea("转化路径", "HostReConf", site.HostReConf).PlaceHolder("字典配置格式").Put("Rows", 8);
|
|
|
|
|
from.AddTextarea("转化路径", "HostReConf", site.HostReConf).PlaceHolder("字典配置格式").Put("Rows", 8).NotRequired();
|
|
|
|
|
from.AddPrompt("值可为rp、rm、in、cdn、CDN,其中rp表示替换域名、rm表示移除域名、in表示提交内容域名转化,cdn表示静态资源加速,CDN表示以资源标签加速");
|
|
|
|
|
|
|
|
|
|
from.Submit("确认", "Site.Config");
|
|
|
|
@ -281,15 +281,15 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
}
|
|
|
|
|
void LogoutPath(Site site)
|
|
|
|
|
{
|
|
|
|
|
var sValue = UIDialog.AsyncDialog(this.Context, "LogoutPath", g =>
|
|
|
|
|
var sValue = this.AsyncDialog("Settings", g =>
|
|
|
|
|
{
|
|
|
|
|
var from2 = new UIFormDialog() { Title = "触发登录页面" };
|
|
|
|
|
from2.AddTextarea("触发登录页面", "LogoutPath", site.LogoutPath as string).Put("Rows", 5);
|
|
|
|
|
from2.AddTextarea("触发登录页面", "LogoutPath", site.LogoutPath as string).Put("Rows", 5).NotRequired();
|
|
|
|
|
|
|
|
|
|
from2.AddPrompt("结尾是“$”则表示从后比对,多项用换行、空格或逗号符分割");
|
|
|
|
|
from2.Submit("确认", "Site.Config");
|
|
|
|
|
return from2;
|
|
|
|
|
});
|
|
|
|
|
})["LogoutPath"] ?? String.Empty;
|
|
|
|
|
|
|
|
|
|
DataFactory.Instance().Put(new Site
|
|
|
|
|
{
|
|
|
|
@ -850,21 +850,12 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
response.Redirect(request.IsMaster ? rdata.Put("IsMaster", true) : rdata);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "none":
|
|
|
|
|
this.Context.Send(new UISectionBuilder(request.Model, request.Command, request.Arguments)
|
|
|
|
|
.RefreshEvent($"{request.Model}.{request.Command}")
|
|
|
|
|
.Builder(), true);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
{
|
|
|
|
|
var title = UITitle.Create();
|
|
|
|
|
|
|
|
|
|
title.Title = "应用网关";
|
|
|
|
|
if (request.IsMaster && request.IsApp)
|
|
|
|
|
{
|
|
|
|
|
title.Right(new UIEventText("新增").Click(new UIClick(new WebMeta(request.Arguments).Put(g, "Create")).Send(request.Model, request.Command)));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var ds = DataFactory.Instance().Site();
|
|
|
|
|
|
|
|
|
|
var Keyword = form["Keyword"];
|
|
|
|
@ -911,10 +902,10 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
if (request.IsMaster)
|
|
|
|
|
{
|
|
|
|
|
ui.UIFootBar = new UIFootBar() { IsFixed = true };
|
|
|
|
|
ui.UIFootBar.AddText(new UIEventText("网关服务").Click(new UIClick(new WebMeta(request.Arguments).Put(g, "LogSetting")).Send(request.Model, request.Command)),
|
|
|
|
|
ui.UIFootBar.AddText(new UIEventText("网关服务").Click(new UIClick().Send(request.Model, "Server")),
|
|
|
|
|
new UIEventText("新增应用").Click(new UIClick(new WebMeta(request.Arguments).Put(g, "Create")).Send(request.Model, request.Command)).Style(new UIStyle().BgColor()));
|
|
|
|
|
}
|
|
|
|
|
response.Redirect(ui);
|
|
|
|
|
ui.SendTo(this.Context, true, $"{request.Model}.{request.Command}");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -947,9 +938,9 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
request.Arguments.Put("Key", site.Root);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.Context.Send(new UISectionBuilder(request.Model, request.Command, request.Arguments)
|
|
|
|
|
.RefreshEvent("Site.Config", "System.Picture")
|
|
|
|
|
.Builder(), true);
|
|
|
|
|
// this.Context.Send(new UISectionBuilder(request.Model, request.Command, request.Arguments)
|
|
|
|
|
// .RefreshEvent("Site.Config", "System.Picture")
|
|
|
|
|
// .Builder(), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var IsProxy = SiteConfig.Config(site.AuthConf).Contains("*");
|
|
|
|
@ -1157,7 +1148,7 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
new UIEventText("重新加载").Click(new UIClick(new WebMeta(request.Arguments).Put(g, "Reload")).Send(request.Model, request.Command)).Style(new UIStyle().BgColor()));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
response.Redirect(ui);
|
|
|
|
|
ui.SendTo(this.Context, true, "Site.Config", "System.Picture");
|
|
|
|
|
return this.DialogValue("none");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -1405,7 +1396,7 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
from.Submit("确认", "Site.Config");
|
|
|
|
|
return from;
|
|
|
|
|
});
|
|
|
|
|
var Key = config["LogConf"];
|
|
|
|
|
var Key = config["LogConf"] ?? String.Empty;
|
|
|
|
|
|
|
|
|
|
DataFactory.Instance().Put(new Site { Root = site.Root, LogConf = Key });
|
|
|
|
|
|
|
|
|
@ -1466,7 +1457,7 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
from.Submit("确认", "Site.Config");
|
|
|
|
|
return from;
|
|
|
|
|
});
|
|
|
|
|
var Key = config["AppendJSConf"];
|
|
|
|
|
var Key = config["AppendJSConf"] ?? String.Empty;
|
|
|
|
|
|
|
|
|
|
DataFactory.Instance().Put(new Site { Root = site.Root, AppendJSConf = Key });
|
|
|
|
|
|
|
|
|
@ -1485,7 +1476,7 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
from.Submit("确认", "Site.Config");
|
|
|
|
|
return from;
|
|
|
|
|
});
|
|
|
|
|
var Key = config["ImagesConf"];
|
|
|
|
|
var Key = config["ImagesConf"] ?? String.Empty;
|
|
|
|
|
|
|
|
|
|
DataFactory.Instance().Put(new Site { Root = site.Root, ImagesConf = Key });
|
|
|
|
|
|
|
|
|
@ -1504,7 +1495,7 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
from.Submit("确认", "Site.Config");
|
|
|
|
|
return from;
|
|
|
|
|
});
|
|
|
|
|
var Key = config["StaticConf"];
|
|
|
|
|
var Key = config["StaticConf"] ?? String.Empty;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DataFactory.Instance().Put(new Site { Root = site.Root, StaticConf = Key });
|
|
|
|
|