Example #1
0
        static AppController()
        {
            MenuOrder   = 38;
            LogOnChange = true;

            ListFields.RemoveField("Secret", "Logo", "White", "Black", "Urls", "Remark");

            {
                var df = ListFields.AddDataField("AppLog", "Enable");
                df.Header      = "日志";
                df.DisplayName = "日志";
                df.Url         = "AppLog?appId={ID}";
            }

            {
                var df = AddFormFields.AddDataField("RoleIds");
                df.DataSource = (entity, field) => Role.FindAllWithCache().ToDictionary(e => e.ID, e => e.Name);
            }

            {
                var df = EditFormFields.AddDataField("RoleIds");
                df.DataSource = (entity, field) => Role.FindAllWithCache().ToDictionary(e => e.ID, e => e.Name);
            }

            {
                var df = ListFields.AddDataField("Log", "UpdateUserId");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = "/Admin/Log?category=应用系统&linkId={ID}";
            }
        }
Example #2
0
        static RedisNodeController()
        {
            MenuOrder = 50;

            ListFields.RemoveField("WebHook", "AlarmMemoryRate", "AlarmConnections", "AlarmSpeed", "AlarmInputKbps", "AlarmOutputKbps");
            ListFields.RemoveCreateField();
            ListFields.RemoveField("UpdateUser", "UpdateUserID", "UpdateIP", "Remark");

            {
                var df = ListFields.AddDataField("Monitor", "UpdateTime");
                df.DisplayName = "监控";
                df.Header      = "监控";
                df.Url         = "RedisData?redisId={Id}";
            }
            {
                var df = ListFields.AddDataField("Queue", "UpdateTime");
                df.DisplayName = "队列";
                df.Header      = "队列";
                df.Url         = "RedisMessageQueue?redisId={Id}";
            }
            {
                var df = ListFields.AddDataField("Refresh", "UpdateTime");
                df.DisplayName = "刷新";
                df.Header      = "刷新";
                df.Url         = "RedisNode/Refresh?Id={Id}";
                df.DataAction  = "action";
            }
            {
                var df = ListFields.AddDataField("Log", "UpdateTime");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = $"/Admin/Log?category={HttpUtility.UrlEncode("Redis节点")}&linkId={{Id}}";
            }
        }
Example #3
0
        static UserConnectController()
        {
            ListFields.RemoveField("AccessToken");
            ListFields.RemoveField("RefreshToken");
            ListFields.RemoveField("Avatar");

            // 提供者列,增加查询
            {
                var df = ListFields.AddDataField(UserConnect._.Provider);
                df.Url = "?provider={Provider}";
            }

            // 用户列,增加连接
            {
                var df = ListFields.AddDataField("UserName");
                df.Header      = "用户";
                df.HeaderTitle = "对应的本地用户信息";
                df.DisplayName = "{UserName}";
                df.Url         = "User?id={UserID}";
            }

            {
                var df = ListFields.AddDataField("OAuthLog", "Enable");
                df.Header      = "OAuth日志";
                df.DisplayName = "OAuth日志";
                df.Url         = "OAuthLog?connectId={ID}";
            }

            //// 插入一列
            //{
            //    var df = ListFields.AddDataField("用户信息", "CreateUserID");
            //    df.DisplayName = "用户信息";
            //    df.Url = "User?id={UserID}";
            //}
        }
Example #4
0
 static AppRuleController()
 {
     {
         var df = ListFields.AddDataField("Log", "CreateUserID");
         df.DisplayName = "修改日志";
         df.Header      = "修改日志";
         df.Url         = "/Admin/Log?category=应用规则&linkId={Id}";
     }
 }
Example #5
0
        static AppTracerController()
        {
            MenuOrder = 90;

            {
                var df = ListFields.AddDataField("Log", "CreateUser");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = "/Admin/Log?category=应用跟踪器&linkId={Id}";
            }
        }
        static NodeVersionController()
        {
            MenuOrder = 89;

            {
                var df = ListFields.AddDataField("Log", "CreateUserID");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = "/Admin/Log?category=节点版本&linkId={ID}";
            }
        }
Example #7
0
        static AppController()
        {
            MenuOrder = 58;

            {
                var df = ListFields.AddDataField("Configs", "Enable");
                df.Header      = "配置";
                df.DisplayName = "配置";
                df.Url         = "ConfigData?appId={ID}";
            }
        }
Example #8
0
        static ModelTableController()
        {
            MenuOrder = 55;

            ListFields.RemoveField("Controller", "TableName", "ConnName");

            {
                var df = ListFields.AddDataField("Columns", "Enable");
                df.Header      = "列集合";
                df.DisplayName = "列集合";
                df.Url         = "ModelColumn?tableId={Id}";
            }
        }
Example #9
0
        static SampleData2Controller()
        {
            MenuOrder = 49;

            ListFields.RemoveField("ID");
            ListFields.RemoveField("DataId");

            var df = ListFields.AddDataField("trace", "TraceId");

            df.DisplayName = "跟踪";
            df.Header      = "跟踪";
            df.Url         = "/Monitors/SampleData?traceId={TraceId}";
        }
Example #10
0
        static AppController()
        {
            MenuOrder = 38;

            ListFields.RemoveField("Secret", "Logo", "White", "Black", "Urls", "Remark");

            {
                var df = ListFields.AddDataField("AppLog", "Enable");
                df.Header      = "日志";
                df.DisplayName = "日志";
                df.Url         = "AppLog?appId={ID}";
            }
        }
Example #11
0
        static ServiceInfoController()
        {
            MenuOrder = 80;

            ListFields.RemoveField("Secret");

            {
                var df = ListFields.AddDataField(_.Providers);
                df.Url = "AppService?serviceId={Id}";
            }
            {
                var df = ListFields.AddDataField(_.Consumers);
                df.Url = "AppConsume?serviceId={Id}";
            }
        }
Example #12
0
        static UserController()
        {
            MenuOrder = 100;

            ListFields.RemoveField("Avatar", "RoldIds", "Online", "RegisterIP", "RegisterTime");
            ListFields.RemoveField("Phone", "Code", "Question", "Answer");
            ListFields.RemoveField("Ex1", "Ex2", "Ex3", "Ex4", "Ex5", "Ex6");
            ListFields.RemoveUpdateField();
            ListFields.RemoveField("Remark");

            {
                var df = ListFields.AddDataField("Link", "Logins");
                df.Header      = "链接";
                df.DisplayName = "链接";
                df.Url         = "UserConnect?userId={ID}";
            }

            {
                var df = ListFields.AddDataField("Token", "Logins");
                df.Header      = "令牌";
                df.DisplayName = "令牌";
                df.Url         = "UserToken?userId={ID}";
            }

            {
                var df = ListFields.AddDataField("Log", "Logins");
                df.Header      = "日志";
                df.DisplayName = "日志";
                df.Url         = "Log?userId={ID}";
            }

            {
                var df = ListFields.AddDataField("OAuthLog", "Logins");
                df.Header      = "OAuth日志";
                df.DisplayName = "OAuth日志";
                df.Url         = "OAuthLog?userId={ID}";
            }

            {
                var df = AddFormFields.AddDataField("RoleIds");
                df.DataSource = (entity, field) => Role.FindAllWithCache().ToDictionary(e => e.ID, e => e.Name);
            }

            {
                var df = EditFormFields.AddDataField("RoleIds");
                df.DataSource = (entity, field) => Role.FindAllWithCache().ToDictionary(e => e.ID, e => e.Name);
            }
        }
        static RedisMessageQueueController()
        {
            MenuOrder = 30;

            ListFields.RemoveCreateField();
            ListFields.RemoveUpdateField();
            ListFields.AddField("UpdateTime");
            ListFields.RemoveField("WebHook");

            {
                var df = ListFields.AddDataField("Log", "UpdateTime");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = "/Admin/Log?category=Redis消息队列&linkId={Id}";
            }
        }
Example #14
0
        static AlarmGroupController()
        {
            MenuOrder = 90;

            {
                var df = ListFields.AddDataField("History", null, "Enable");
                df.DisplayName = "告警历史";
                df.Header      = "告警历史";
                df.Url         = "AlarmHistory?groupId={Id}";
            }
            {
                var df = ListFields.AddDataField("Log", "CreateUser");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = "/Admin/Log?category=告警组&linkId={Id}";
            }
        }
Example #15
0
        static CronJobController()
        {
            MenuOrder = 35;

            ListFields.RemoveCreateField();

            {
                var df = ListFields.AddDataField("Log", null, "Enable");
                df.Header      = "日志";
                df.DisplayName = "日志";
                df.Url         = "Log?category=CronJob&linkId={Id}";
            }
            {
                var df = ListFields.AddDataField("JobLog", null, "Enable");
                df.Header      = "作业日志";
                df.DisplayName = "作业日志";
                df.Url         = "Log?category=JobService&linkId={Id}";
            }
        }
Example #16
0
        static ConfigDataController()
        {
            ListFields.AddDataField("Value", null, "Scope");
            ListFields.AddDataField("NewValue", null, "NewStatus");
            //ListFields.RemoveField("Remark");
            ListFields.RemoveField("CreateIP", "UpdateIP");

            AddFormFields.RemoveCreateField();
            AddFormFields.RemoveUpdateField();
            AddFormFields.RemoveField("Version", "NewVersion", "NewValue", "NewStatus");

            EditFormFields.RemoveCreateField();
            EditFormFields.RemoveUpdateField();
            EditFormFields.RemoveField("Version", "NewVersion");

            {
                var df = EditFormFields.GetField("Value");
                df.Readonly = true;
            }
        }
Example #17
0
        static AppController()
        {
            MenuOrder = 99;

            ListFields.RemoveField("Secret");

            {
                var df = ListFields.AddDataField("History", null, "AutoActive");
                df.DisplayName = "历史";
                df.Header      = "历史";
                df.Url         = "AppHistory?appId={Id}";
            }
            {
                var df = ListFields.AddDataField("Deploy", null, "AutoActive");
                df.DisplayName = "部署";
                df.Header      = "部署";
                df.Url         = "/Deployment/AppDeploy?appId={Id}";
            }
            {
                var df = ListFields.AddDataField("Providers", null, "AutoActive");
                df.DisplayName = "提供服务";
                df.Header      = "提供服务";
                df.Url         = "AppService?appId={Id}";
                df.DataVisible = (e, f) => (e as App).Providers.Count > 0;
            }
            {
                var df = ListFields.AddDataField("Consumers", null, "AutoActive");
                df.DisplayName = "消费服务";
                df.Header      = "消费服务";
                df.Url         = "AppConsume?appId={Id}";
                df.DataVisible = (e, f) => (e as App).Consumers.Count > 0;
            }
            {
                var df = ListFields.AddDataField("Log", "CreateUser");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = "/Admin/Log?category=应用系统&linkId={Id}";
            }
        }
Example #18
0
        static AppDeployController()
        {
            MenuOrder = 90;

            ListFields.RemoveCreateField();
            ListFields.RemoveField("ApolloMetaServer");

            {
                var df = ListFields.AddDataField("AddNode", null, "Enable");
                df.Header      = "节点";
                df.DisplayName = "添加节点";
                df.Title       = "添加服务器节点";
                df.Url         = "AppDeployNode/Add?appId={AppId}&deployId={Id}";
            }

            {
                var df = ListFields.AddDataField("Nodes");
                df.Header = "节点";
                //df.DisplayName = "添加节点";
                //df.Title = "添加服务器节点";
                df.Url = "AppDeployNode?deployId={Id}";
            }

            {
                var df = ListFields.AddDataField("AppName");
                df.Header = "应用";
                df.Url    = "/Registry/App?Id={AppId}";
            }

            {
                var df = ListFields.AddDataField("Log", "UpdateUserId");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = "/Admin/Log?category=应用部署&linkId={Id}";
            }
        }
Example #19
0
 static ConfigHistoryController()
 {
     // 日志列表需要显示详细信息
     ListFields.AddDataField("Remark", null, "Action");
 }
Example #20
0
        static AppConfigController()
        {
            MenuOrder = 58;

            ListFields.RemoveCreateField();
            ListFields.RemoveField("EnableApollo", "ApolloMetaServer", "ApolloAppId", "ApolloNameSpace");

            {
                var df = ListFields.AddDataField("Configs", "Enable");
                df.Header      = "管理配置";
                df.DisplayName = "管理配置";
                df.Title       = "查看该应用所有配置数据";
                df.Url         = "ConfigData?appId={Id}";
            }

            {
                var df = ListFields.AddDataField("Publish", "PublishTime");
                df.Header      = "发布";
                df.DisplayName = "发布";
                df.Url         = "Appconfig/Publish?appId={Id}";
                df.DataAction  = "action";
                df.DataVisible = (e, f) => (e is AppConfig ac && ac.Version < ac.NextVersion);
            }

            {
                var df = ListFields.AddDataField("History", "PublishTime");
                df.Header      = "历史";
                df.DisplayName = "历史";
                df.Title       = "查看该应用的配置历史";
                df.Url         = "ConfigHistory?appId={Id}";
            }

            {
                var df = ListFields.AddDataField("Preview", "PublishTime");
                df.Header      = "预览";
                df.DisplayName = "预览";
                df.Title       = "查看该应用的配置数据";
                df.Url         = "/config/getall?appId={Name}&secret={appSecret}";
            }

            {
                var df = ListFields.AddDataField("Log", "UpdateUserID");
                df.DisplayName = "修改日志";
                df.Header      = "修改日志";
                df.Url         = "/Admin/Log?category=应用配置&linkId={Id}";
            }

            {
                var df = AddFormFields.AddDataField("Quotes");
                df.DataSource = (entity, field) => AppConfig.FindAllWithCache().Where(e => e.CanBeQuoted).ToDictionary(e => e.Id, e => e.Name);
            }

            {
                var df = EditFormFields.AddDataField("Quotes");
                df.DataSource = (entity, field) => AppConfig.FindAllWithCache().Where(e => e.CanBeQuoted).ToDictionary(e => e.Id, e => e.Name);
            }

            //// 异步同步应用
            //{
            //    Task.Run(() => AppConfig.Sync());
            //}
        }