临时提交
This commit is contained in:
parent
10cd3440dc
commit
26e2c32180
|
@ -1 +0,0 @@
|
|||
请不要删除此目录
|
|
@ -1,29 +0,0 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Caching;
|
||||
using Longbow.ExceptionManagement;
|
||||
using Longbow.ExceptionManagement.Configuration;
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace Bootstrap.Admin
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class DBPublisher : IExceptionPublisher
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ex"></param>
|
||||
/// <param name="additionalInfo"></param>
|
||||
/// <param name="publisherElement"></param>
|
||||
public void Publish(Exception ex, NameValueCollection additionalInfo, ExceptionPublisherElement publisherElement)
|
||||
{
|
||||
if (publisherElement.Mode == PublisherMode.Off) return;
|
||||
ExceptionHelper.Log(ex, additionalInfo);
|
||||
CacheManager.Clear(k => k == ExceptionHelper.RetrieveExceptionsDataKey);
|
||||
NotificationHelper.MessagePool.Add(new MessageBody() { Category = "Notification", Message = ex.Message });
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
using Bootstrap.Security.Mvc;
|
||||
using Longbow.Web.Mvc;
|
||||
using System;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Bootstrap.Admin
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class FilterConfig
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="filters"></param>
|
||||
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
|
||||
{
|
||||
if (filters == null) throw new ArgumentNullException("filters");
|
||||
filters.Add(new LgbHandleErrorAttribute());
|
||||
filters.Add(new BAAuthorizeAttribute());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace Bootstrap.Admin
|
||||
{
|
||||
public class RouteConfig
|
||||
{
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
||||
|
||||
routes.MapRoute(
|
||||
name: "Default",
|
||||
url: "{controller}/{action}/{id}",
|
||||
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
using Bootstrap.Security.Mvc;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin
|
||||
{
|
||||
public static class WebApiConfig
|
||||
{
|
||||
public static void Register(HttpConfiguration config)
|
||||
{
|
||||
// Web API configuration and services
|
||||
config.Filters.Add(new BAAPIAuthorizaAttribute());
|
||||
// Web API routes
|
||||
config.MapHttpAttributeRoutes();
|
||||
|
||||
config.Routes.MapHttpRoute(
|
||||
name: "DefaultApi",
|
||||
routeTemplate: "api/{controller}/{id}",
|
||||
defaults: new { id = RouteParameter.Optional }
|
||||
);
|
||||
|
||||
var json = GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings;
|
||||
json.DateFormatString = "yyyy'-'MM'-'dd' 'HH':'mm':'ss";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,391 +1,167 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{7B2B7043-3CB2-4C5A-BDF2-8C47F1A5471A}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Bootstrap.Admin</RootNamespace>
|
||||
<AssemblyName>Bootstrap.Admin</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<Use64BitIISExpress />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Bootstrap.Security.Mvc, Version=4.1.0.0, Culture=neutral, PublicKeyToken=c20f2177a7066899, processorArchitecture=MSIL" />
|
||||
<Reference Include="Longbow, Version=4.1.0.0, Culture=neutral, PublicKeyToken=c20f2177a7066899, processorArchitecture=MSIL" />
|
||||
<Reference Include="Longbow.ComponentModel, Version=4.1.0.0, Culture=neutral, PublicKeyToken=c20f2177a7066899, processorArchitecture=MSIL" />
|
||||
<Reference Include="Longbow.ExceptionManagement, Version=4.1.0.0, Culture=neutral, PublicKeyToken=c20f2177a7066899, processorArchitecture=MSIL" />
|
||||
<Reference Include="Longbow.Web.Mvc, Version=4.1.0.0, Culture=neutral, PublicKeyToken=c20f2177a7066899, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<PackageReference Include="Bootstrap.Security.Mvc" Version="1.0.0" />
|
||||
<PackageReference Include="Longbow.Web" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Web.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Webpages">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.3\lib\net45\System.Web.Webpages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Webpages.Deployment">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.3\lib\net45\System.Web.Webpages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Webpages.Razor">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.3\lib\net45\System.Web.Webpages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Helpers">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure">
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||
</Reference>
|
||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="App_Data\ErrorLog\Readme.txt" />
|
||||
<Content Include="Content\bootstrap-theme.css" />
|
||||
<Content Include="Content\bootstrap-theme.min.css" />
|
||||
<Content Include="Content\bootstrap.css" />
|
||||
<Content Include="Content\bootstrap.min.css" />
|
||||
<Content Include="Content\api.css" />
|
||||
<Content Include="Content\bootstrap-datetimepicker.css" />
|
||||
<Content Include="Content\bootstrap-datetimepicker.min.css" />
|
||||
<Content Include="Content\fileinput.css" />
|
||||
<Content Include="Content\fileinput.min.css" />
|
||||
<Content Include="Content\IE8.css" />
|
||||
<Content Include="Content\images\bg2.jpg" />
|
||||
<Content Include="Content\images\bg4.jpg" />
|
||||
<Content Include="Content\images\bg3.png" />
|
||||
<Content Include="Content\login-responsive.css" />
|
||||
<Content Include="Content\nprogress.css" />
|
||||
<Content Include="Content\font-awesome.css" />
|
||||
<Content Include="Content\font-awesome.min.css" />
|
||||
<Content Include="Content\html\api.html" />
|
||||
<Content Include="Content\images\error_icon.png" />
|
||||
<Content Include="Content\toastr.css" />
|
||||
<Content Include="Content\toastr.min.css" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="Content\admin-responsive.css" />
|
||||
<Content Include="Content\admin.css" />
|
||||
<Content Include="Content\blue.css" />
|
||||
<Content Include="Content\fa.css" />
|
||||
<Content Include="Content\bootstrap-table.css" />
|
||||
<Content Include="Content\bootstrap-table.min.css" />
|
||||
<Content Include="Content\jquery.nestable.css" />
|
||||
<Content Include="Content\lock.css" />
|
||||
<Content Include="Content\login.css" />
|
||||
<Content Include="Content\register.css" />
|
||||
<Content Include="Content\tasks.css" />
|
||||
<Content Include="Content\html\RegResult.html" />
|
||||
<Content Include="Content\images\bg.jpg" />
|
||||
<Content Include="Content\images\loading-sm.gif" />
|
||||
<Content Include="Content\images\loading.gif" />
|
||||
<Content Include="Content\images\lock-bg.jpg" />
|
||||
<Content Include="Content\images\logo.jpg" />
|
||||
<Content Include="Content\images\logo1.jpg" />
|
||||
<Content Include="Content\images\logo2.jpg" />
|
||||
<Content Include="Content\images\logo3.jpg" />
|
||||
<Content Include="Content\images\logo4.jpg" />
|
||||
<Content Include="Content\images\logo5.jpg" />
|
||||
<Content Include="Content\images\logo6.jpg" />
|
||||
<Content Include="Content\images\uploader\Admin.jpg" />
|
||||
<Content Include="Content\images\uploader\default.jpg" />
|
||||
<Content Include="Content\images\uploader\readme.txt" />
|
||||
<Content Include="Content\site-responsive.css" />
|
||||
<Content Include="Content\images\error.png" />
|
||||
<Content Include="Content\images\nav-expand.png" />
|
||||
<Content Include="Content\site.css" />
|
||||
<Content Include="Content\sweetalert.css" />
|
||||
<Content Include="Content\images\success.png" />
|
||||
<Content Include="fonts\fontawesome-webfont.svg" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.svg" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="Scripts\additional-methods.js" />
|
||||
<Content Include="Scripts\additional-methods.min.js" />
|
||||
<Content Include="Scripts\bootstrap-datetimepicker.js" />
|
||||
<Content Include="Scripts\bootstrap-datetimepicker.min.js" />
|
||||
<Content Include="Scripts\bootstrap-datetimepicker.zh-CN.js" />
|
||||
<Content Include="Scripts\bootstrap-table-zh-CN.js" />
|
||||
<Content Include="Scripts\bootstrap-table-zh-CN.min.js" />
|
||||
<Content Include="Scripts\bootstrap-table.js" />
|
||||
<Content Include="Scripts\bootstrap-table.min.js" />
|
||||
<Content Include="Scripts\bootstrap.js" />
|
||||
<Content Include="Scripts\bootstrap.min.js" />
|
||||
<Content Include="Scripts\bootstrap3-typeahead.js" />
|
||||
<Content Include="Scripts\bootstrap3-typeahead.min.js" />
|
||||
<Content Include="Scripts\common-scripts.js" />
|
||||
<Content Include="Scripts\Content.js" />
|
||||
<Content Include="Scripts\Dicts.js" />
|
||||
<Content Include="Scripts\Exceptions.js" />
|
||||
<Content Include="Scripts\fileinput.js" />
|
||||
<Content Include="Scripts\fileinput.min.js" />
|
||||
<Content Include="Scripts\fileinput.zh.js" />
|
||||
<Content Include="Scripts\framework.js" />
|
||||
<Content Include="Scripts\Groups.js" />
|
||||
<Content Include="Scripts\icon.js" />
|
||||
<Content Include="Scripts\Profiles.js" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff2" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.ttf" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.eot" />
|
||||
<Content Include="Content\bootstrap.min.css.map" />
|
||||
<Content Include="Content\bootstrap.css.map" />
|
||||
<Content Include="Content\bootstrap-theme.min.css.map" />
|
||||
<Content Include="Content\bootstrap-theme.css.map" />
|
||||
<Content Include="fonts\FontAwesome.otf" />
|
||||
<Content Include="fonts\fontawesome-webfont.woff2" />
|
||||
<Content Include="fonts\fontawesome-webfont.woff" />
|
||||
<Content Include="fonts\fontawesome-webfont.ttf" />
|
||||
<Content Include="fonts\fontawesome-webfont.eot" />
|
||||
<Content Include="..\Keys\Longbow.Utility.snk">
|
||||
<Link>Longbow.Utility.snk</Link>
|
||||
<ProjectReference Include="..\Bootstrap.DataAccess\Bootstrap.DataAccess.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="appsettings.Development.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Scripts\jquery-3.1.1.intellisense.js" />
|
||||
<Content Include="Scripts\jquery-3.1.1.js" />
|
||||
<Content Include="Scripts\jquery-3.1.1.min.js" />
|
||||
<Content Include="Scripts\jquery-3.1.1.slim.js" />
|
||||
<Content Include="Scripts\jquery-3.1.1.slim.min.js" />
|
||||
<None Include="Scripts\jquery.validate-vsdoc.js" />
|
||||
<Content Include="Scripts\jquery.dcjqaccordion.2.7.js" />
|
||||
<Content Include="Scripts\jquery.nestable.js" />
|
||||
<Content Include="Scripts\jquery.nicescroll.min.js" />
|
||||
<Content Include="Scripts\jquery.scrollTo.js" />
|
||||
<Content Include="Scripts\jquery.scrollTo.min.js" />
|
||||
<Content Include="Scripts\jquery.validate.js" />
|
||||
<Content Include="Scripts\jquery.validate.min.js" />
|
||||
<Content Include="Scripts\lock.js" />
|
||||
<Content Include="Scripts\log.js" />
|
||||
<Content Include="Scripts\Login.js" />
|
||||
<Content Include="Scripts\Logs.js" />
|
||||
<Content Include="Scripts\Longbow.Common.js" />
|
||||
<Content Include="Scripts\longbow.dataentity.js" />
|
||||
<Content Include="Scripts\Menus.js" />
|
||||
<Content Include="Scripts\message.js" />
|
||||
<Content Include="Scripts\messages_zh.js" />
|
||||
<Content Include="Scripts\messages_zh.min.js" />
|
||||
<Content Include="Scripts\noti.js" />
|
||||
<Content Include="Scripts\nprogress.js" />
|
||||
<Content Include="Scripts\Settings.js" />
|
||||
<Content Include="Scripts\register.js" />
|
||||
<Content Include="Scripts\Roles.js" />
|
||||
<Content Include="Scripts\sweetalert.js" />
|
||||
<Content Include="Scripts\sweetalert.min.js" />
|
||||
<Content Include="Scripts\tasks.js" />
|
||||
<Content Include="Scripts\apidoc.js" />
|
||||
<Content Include="Scripts\toastr.min.js" />
|
||||
<Content Include="Scripts\Users.js" />
|
||||
<Content Include="packages.config" />
|
||||
<Content Include="Scripts\jquery-3.1.1.slim.min.map" />
|
||||
<Content Include="Scripts\jquery-3.1.1.min.map" />
|
||||
<Content Include="Views\Shared\Readme.txt" />
|
||||
<Content Include="Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
<Content Update="appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="cache.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Views\Shared\_Layout.cshtml" />
|
||||
<Content Include="Views\Home\Index.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\bldver.cs">
|
||||
<Link>bldver.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="App_Start\DBPublisher.cs" />
|
||||
<Compile Include="App_Start\FilterConfig.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="App_Start\WebApiConfig.cs" />
|
||||
<Compile Include="Controllers\AdminController.cs" />
|
||||
<Compile Include="Controllers\DictsController.cs" />
|
||||
<Compile Include="Controllers\ExceptionsController.cs" />
|
||||
<Compile Include="Controllers\GroupsController.cs" />
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
<Compile Include="Controllers\ProfilesController.cs" />
|
||||
<Compile Include="Controllers\LoginController.cs" />
|
||||
<Compile Include="Controllers\LogsController.cs" />
|
||||
<Compile Include="Controllers\MenusController.cs" />
|
||||
<Compile Include="Controllers\MessagesController.cs" />
|
||||
<Compile Include="Controllers\NotificationsController.cs" />
|
||||
<Compile Include="Controllers\SettingsController.cs" />
|
||||
<Compile Include="Controllers\RolesController.cs" />
|
||||
<Compile Include="Controllers\TasksController.cs" />
|
||||
<Compile Include="Controllers\UsersController.cs" />
|
||||
<Compile Include="Controllers\WSController.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Models\ProfilesModel.cs" />
|
||||
<Compile Include="Models\LockModel.cs" />
|
||||
<Compile Include="Models\MessageCountModel.cs" />
|
||||
<Compile Include="Models\QueryDictOption.cs" />
|
||||
<Compile Include="Models\QueryExceptionOption.cs" />
|
||||
<Compile Include="Models\QueryGroupOption.cs" />
|
||||
<Compile Include="Models\QueryLogOption.cs" />
|
||||
<Compile Include="Models\QueryMenuOption.cs" />
|
||||
<Compile Include="Models\QueryRoleOption.cs" />
|
||||
<Compile Include="Models\QueryUserOption.cs" />
|
||||
<Compile Include="Models\HeaderBarModel.cs" />
|
||||
<Compile Include="Models\LoginModel.cs" />
|
||||
<Compile Include="Models\ModelBase.cs" />
|
||||
<Compile Include="Models\NavigatorBarModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<None Include="wwwroot\css\admin-responsive.css" />
|
||||
<None Include="wwwroot\css\admin.css" />
|
||||
<None Include="wwwroot\css\api.css" />
|
||||
<None Include="wwwroot\css\blue.css" />
|
||||
<None Include="wwwroot\css\bootstrap-datetimepicker.css" />
|
||||
<None Include="wwwroot\css\bootstrap-datetimepicker.min.css" />
|
||||
<None Include="wwwroot\css\bootstrap-table.css" />
|
||||
<None Include="wwwroot\css\bootstrap-table.min.css" />
|
||||
<None Include="wwwroot\css\bootstrap-theme.css" />
|
||||
<None Include="wwwroot\css\bootstrap-theme.css.map" />
|
||||
<None Include="wwwroot\css\bootstrap-theme.min.css" />
|
||||
<None Include="wwwroot\css\bootstrap-theme.min.css.map" />
|
||||
<None Include="wwwroot\css\bootstrap.css" />
|
||||
<None Include="wwwroot\css\bootstrap.css.map" />
|
||||
<None Include="wwwroot\css\bootstrap.min.css" />
|
||||
<None Include="wwwroot\css\bootstrap.min.css.map" />
|
||||
<None Include="wwwroot\css\fa.css" />
|
||||
<None Include="wwwroot\css\fileinput.css" />
|
||||
<None Include="wwwroot\css\fileinput.min.css" />
|
||||
<None Include="wwwroot\css\font-awesome.css" />
|
||||
<None Include="wwwroot\css\font-awesome.min.css" />
|
||||
<None Include="wwwroot\html\api.html" />
|
||||
<None Include="wwwroot\html\RegResult.html" />
|
||||
<None Include="wwwroot\css\IE8.css" />
|
||||
<None Include="wwwroot\favicon.ico" />
|
||||
<None Include="wwwroot\images\bg.jpg" />
|
||||
<None Include="wwwroot\images\bg2.jpg" />
|
||||
<None Include="wwwroot\images\bg3.png" />
|
||||
<None Include="wwwroot\images\bg4.jpg" />
|
||||
<None Include="wwwroot\images\error.png" />
|
||||
<None Include="wwwroot\images\error_icon.png" />
|
||||
<None Include="wwwroot\images\loading-sm.gif" />
|
||||
<None Include="wwwroot\images\loading.gif" />
|
||||
<None Include="wwwroot\images\lock-bg.jpg" />
|
||||
<None Include="wwwroot\images\logo.jpg" />
|
||||
<None Include="wwwroot\images\logo1.jpg" />
|
||||
<None Include="wwwroot\images\logo2.jpg" />
|
||||
<None Include="wwwroot\images\logo3.jpg" />
|
||||
<None Include="wwwroot\images\logo4.jpg" />
|
||||
<None Include="wwwroot\images\logo5.jpg" />
|
||||
<None Include="wwwroot\images\logo6.jpg" />
|
||||
<None Include="wwwroot\images\nav-expand.png" />
|
||||
<None Include="wwwroot\images\success.png" />
|
||||
<None Include="wwwroot\images\uploader\Admin.jpg" />
|
||||
<None Include="wwwroot\images\uploader\default.jpg" />
|
||||
<None Include="wwwroot\images\uploader\readme.txt" />
|
||||
<None Include="wwwroot\css\jquery.nestable.css" />
|
||||
<None Include="wwwroot\css\lock.css" />
|
||||
<None Include="wwwroot\css\login-responsive.css" />
|
||||
<None Include="wwwroot\css\login.css" />
|
||||
<None Include="wwwroot\css\nprogress.css" />
|
||||
<None Include="wwwroot\css\register.css" />
|
||||
<None Include="wwwroot\css\site-responsive.css" />
|
||||
<None Include="wwwroot\css\site.css" />
|
||||
<None Include="wwwroot\css\sweetalert.css" />
|
||||
<None Include="wwwroot\css\tasks.css" />
|
||||
<None Include="wwwroot\css\toastr.css" />
|
||||
<None Include="wwwroot\css\toastr.min.css" />
|
||||
<None Include="wwwroot\fonts\fontawesome-webfont.eot" />
|
||||
<None Include="wwwroot\fonts\fontawesome-webfont.svg" />
|
||||
<None Include="wwwroot\fonts\fontawesome-webfont.ttf" />
|
||||
<None Include="wwwroot\fonts\fontawesome-webfont.woff" />
|
||||
<None Include="wwwroot\fonts\fontawesome-webfont.woff2" />
|
||||
<None Include="wwwroot\fonts\FontAwesome.otf" />
|
||||
<None Include="wwwroot\fonts\glyphicons-halflings-regular.eot" />
|
||||
<None Include="wwwroot\fonts\glyphicons-halflings-regular.svg" />
|
||||
<None Include="wwwroot\fonts\glyphicons-halflings-regular.ttf" />
|
||||
<None Include="wwwroot\fonts\glyphicons-halflings-regular.woff" />
|
||||
<None Include="wwwroot\fonts\glyphicons-halflings-regular.woff2" />
|
||||
<None Include="wwwroot\js\additional-methods.js" />
|
||||
<None Include="wwwroot\js\additional-methods.min.js" />
|
||||
<None Include="wwwroot\js\apidoc.js" />
|
||||
<None Include="wwwroot\js\bootstrap-datetimepicker.js" />
|
||||
<None Include="wwwroot\js\bootstrap-datetimepicker.min.js" />
|
||||
<None Include="wwwroot\js\bootstrap-datetimepicker.zh-CN.js" />
|
||||
<None Include="wwwroot\js\bootstrap-table-zh-CN.js" />
|
||||
<None Include="wwwroot\js\bootstrap-table-zh-CN.min.js" />
|
||||
<None Include="wwwroot\js\bootstrap-table.js" />
|
||||
<None Include="wwwroot\js\bootstrap-table.min.js" />
|
||||
<None Include="wwwroot\js\bootstrap.js" />
|
||||
<None Include="wwwroot\js\bootstrap.min.js" />
|
||||
<None Include="wwwroot\js\bootstrap3-typeahead.js" />
|
||||
<None Include="wwwroot\js\bootstrap3-typeahead.min.js" />
|
||||
<None Include="wwwroot\js\common-scripts.js" />
|
||||
<None Include="wwwroot\js\Content.js" />
|
||||
<None Include="wwwroot\js\Dicts.js" />
|
||||
<None Include="wwwroot\js\Exceptions.js" />
|
||||
<None Include="wwwroot\js\fileinput.js" />
|
||||
<None Include="wwwroot\js\fileinput.min.js" />
|
||||
<None Include="wwwroot\js\fileinput.zh.js" />
|
||||
<None Include="wwwroot\js\framework.js" />
|
||||
<None Include="wwwroot\js\Groups.js" />
|
||||
<None Include="wwwroot\js\icon.js" />
|
||||
<None Include="wwwroot\js\jquery-3.1.1.intellisense.js" />
|
||||
<None Include="wwwroot\js\jquery-3.1.1.js" />
|
||||
<None Include="wwwroot\js\jquery-3.1.1.min.js" />
|
||||
<None Include="wwwroot\js\jquery-3.1.1.min.map" />
|
||||
<None Include="wwwroot\js\jquery-3.1.1.slim.js" />
|
||||
<None Include="wwwroot\js\jquery-3.1.1.slim.min.js" />
|
||||
<None Include="wwwroot\js\jquery-3.1.1.slim.min.map" />
|
||||
<None Include="wwwroot\js\jquery.dcjqaccordion.2.7.js" />
|
||||
<None Include="wwwroot\js\jquery.nestable.js" />
|
||||
<None Include="wwwroot\js\jquery.nicescroll.min.js" />
|
||||
<None Include="wwwroot\js\jquery.scrollTo.js" />
|
||||
<None Include="wwwroot\js\jquery.scrollTo.min.js" />
|
||||
<None Include="wwwroot\js\jquery.validate-vsdoc.js" />
|
||||
<None Include="wwwroot\js\jquery.validate.js" />
|
||||
<None Include="wwwroot\js\jquery.validate.min.js" />
|
||||
<None Include="wwwroot\js\lock.js" />
|
||||
<None Include="wwwroot\js\log.js" />
|
||||
<None Include="wwwroot\js\Login.js" />
|
||||
<None Include="wwwroot\js\Logs.js" />
|
||||
<None Include="wwwroot\js\Longbow.Common.js" />
|
||||
<None Include="wwwroot\js\longbow.dataentity.js" />
|
||||
<None Include="wwwroot\js\Menus.js" />
|
||||
<None Include="wwwroot\js\message.js" />
|
||||
<None Include="wwwroot\js\messages_zh.js" />
|
||||
<None Include="wwwroot\js\messages_zh.min.js" />
|
||||
<None Include="wwwroot\js\noti.js" />
|
||||
<None Include="wwwroot\js\nprogress.js" />
|
||||
<None Include="wwwroot\js\Profiles.js" />
|
||||
<None Include="wwwroot\js\register.js" />
|
||||
<None Include="wwwroot\js\Roles.js" />
|
||||
<None Include="wwwroot\js\Settings.js" />
|
||||
<None Include="wwwroot\js\sweetalert.js" />
|
||||
<None Include="wwwroot\js\sweetalert.min.js" />
|
||||
<None Include="wwwroot\js\tasks.js" />
|
||||
<None Include="wwwroot\js\toastr.js.map" />
|
||||
<None Include="wwwroot\js\toastr.min.js" />
|
||||
<None Include="wwwroot\js\Users.js" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\web.config" />
|
||||
<Content Include="Views\Shared\_Normal.cshtml" />
|
||||
<Content Include="Views\Shared\_Admin.cshtml" />
|
||||
<Content Include="Views\Admin\Index.cshtml" />
|
||||
<Content Include="Views\Shared\_Default.cshtml" />
|
||||
<Content Include="Views\Admin\Users.cshtml" />
|
||||
<Content Include="Views\_ViewStart.cshtml" />
|
||||
<Content Include="Views\Shared\Header.cshtml" />
|
||||
<Content Include="Views\Shared\Navigator.cshtml" />
|
||||
<Content Include="Views\Home\Login.cshtml" />
|
||||
<Content Include="Views\Shared\UnAuthorized.cshtml" />
|
||||
<Content Include="Views\Shared\AwesomeIcon.cshtml" />
|
||||
<Content Include="Views\Admin\FAIcon.cshtml" />
|
||||
<Content Include="Views\Admin\Groups.cshtml" />
|
||||
<Content Include="Views\Admin\Roles.cshtml" />
|
||||
<Content Include="Views\Admin\Menus.cshtml" />
|
||||
<Content Include="Views\Admin\Dicts.cshtml" />
|
||||
<Content Include="Views\Shared\RoleConfig.cshtml" />
|
||||
<Content Include="Views\Shared\IconView.cshtml" />
|
||||
<Content Include="Views\Shared\UserConfig.cshtml" />
|
||||
<Content Include="Views\Shared\GroupConfig.cshtml" />
|
||||
<Content Include="Views\Admin\Logs.cshtml" />
|
||||
<Content Include="Views\Admin\Settings.cshtml" />
|
||||
<Content Include="Views\Shared\Footer.cshtml" />
|
||||
<Content Include="Views\Shared\NavigatorConfig.cshtml" />
|
||||
<Content Include="Views\Shared\SubNavigation.cshtml" />
|
||||
<Content Include="Views\Home\Lock.cshtml" />
|
||||
<Content Include="Views\Home\Register.cshtml" />
|
||||
<Content Include="Views\Admin\Notifications.cshtml" />
|
||||
<Content Include="Views\Admin\Profiles.cshtml" />
|
||||
<Content Include="Views\Admin\Exceptions.cshtml" />
|
||||
<Content Include="Views\Admin\Messages.cshtml" />
|
||||
<Content Include="Views\Admin\Tasks.cshtml" />
|
||||
<Content Include="Views\Admin\Mobile.cshtml" />
|
||||
<Content Include="Views\Shared\_Mobile.cshtml" />
|
||||
<Content Include="Views\Home\Mobile.cshtml" />
|
||||
<Content Include="Views\Shared\SubMenu.cshtml" />
|
||||
<Content Include="Views\Admin\Api.cshtml" />
|
||||
<Content Include="Views\Shared\_ButtonBarGroup.cshtml" />
|
||||
<Content Include="Scripts\toastr.js.map" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
<None Include="Web.Release.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Bootstrap.DataAccess\Bootstrap.DataAccess.csproj">
|
||||
<Project>{af16ca71-b8c6-4f51-b38c-0c0300fdebd7}</Project>
|
||||
<Name>Bootstrap.DataAccess</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>..\Keys\Longbow.Utility.snk</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DelaySign>false</DelaySign>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>53737</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:53233/</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
</Project>
|
Binary file not shown.
Before Width: | Height: | Size: 7.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.0 KiB |
|
@ -1 +0,0 @@
|
|||
请不要删除此目录
|
|
@ -0,0 +1,75 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Account controller.
|
||||
/// </summary>
|
||||
[AllowAnonymous]
|
||||
public class AccountController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
/// Login the specified userName, password and remember.
|
||||
/// </summary>
|
||||
/// <returns>The login.</returns>
|
||||
/// <param name="userName">User name.</param>
|
||||
/// <param name="password">Password.</param>
|
||||
/// <param name="remember">Remember.</param>
|
||||
public async Task<IActionResult> Login(string userName, string password, string remember)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(userName) && BootstrapUser.Authenticate(userName, password))
|
||||
{
|
||||
var identity = new ClaimsIdentity(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
identity.AddClaim(new Claim(ClaimTypes.Name, userName));
|
||||
await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(identity));
|
||||
return Redirect("~/");
|
||||
}
|
||||
var mobile = true; //Request.Browser.IsMobileDevice;
|
||||
var model = "IPad"; //Request.Browser.MobileDeviceModel;
|
||||
return mobile && model != "IPad" ? View("Loginm", new ModelBase()) : View("Login", new ModelBase());
|
||||
}
|
||||
/// <summary>
|
||||
/// Logout this instance.
|
||||
/// </summary>
|
||||
/// <returns>The logout.</returns>
|
||||
public async Task<IActionResult> Logout()
|
||||
{
|
||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
return Redirect("~" + CookieAuthenticationDefaults.LoginPath);
|
||||
}
|
||||
/// <summary>
|
||||
/// Accesses the denied.
|
||||
/// </summary>
|
||||
/// <returns>The denied.</returns>
|
||||
public ActionResult AccessDenied()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ActionResult Register(User p)
|
||||
{
|
||||
if (string.IsNullOrEmpty(p.UserName) || string.IsNullOrEmpty(p.Password) || string.IsNullOrEmpty(p.DisplayName) || string.IsNullOrEmpty(p.Description)) return View();
|
||||
p.UserStatus = 1;
|
||||
return UserHelper.SaveUser(p) ? (ActionResult)Redirect("~/html/RegResult.html") : View();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ActionResult Mobile()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using System.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
|
@ -14,7 +15,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Index"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -22,7 +23,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Users()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Users"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -30,7 +31,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Groups()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Groups"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -38,7 +39,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Dicts()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Dicts"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -46,7 +47,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Roles()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Roles"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -54,7 +55,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Menus()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Menus"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -62,7 +63,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Logs()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Logs"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -70,17 +71,15 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult FAIcon()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/FAIcon"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[OutputCache(CacheProfile = "IconView")]
|
||||
[AllowAnonymous]
|
||||
public PartialViewResult IconView()
|
||||
{
|
||||
Response.Cache.SetOmitVaryStar(true);
|
||||
return PartialView("IconView");
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -89,7 +88,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Settings()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Settings"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -98,7 +97,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Notifications()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Notifications"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -107,7 +106,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Profiles()
|
||||
{
|
||||
return View(new ProfilesModel("~/Admin/Profiles"));
|
||||
return View(new ProfilesModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -115,7 +114,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Exceptions()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Exceptions"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -123,7 +122,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Messages()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Messages"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -131,7 +130,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Tasks()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Tasks"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -139,7 +138,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Mobile()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Mobile"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -147,7 +146,7 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Api()
|
||||
{
|
||||
return View(new NavigatorBarModel("~/Admin/Api"));
|
||||
return View(new NavigatorBarModel(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
public class CategoryController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public IEnumerable<BootstrapDict> Get()
|
||||
{
|
||||
return DictHelper.RetrieveCategories();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class DictsController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<BootstrapDict> Get(QueryDictOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpPost]
|
||||
public bool Post([FromBody]BootstrapDict value)
|
||||
{
|
||||
return DictHelper.SaveDict(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpDelete]
|
||||
[Authorize(Roles = "Administrators")]
|
||||
public object Delete(string value)
|
||||
{
|
||||
var result = DictHelper.DeleteDict(value);
|
||||
return new { result, msg = result ? "成功!" : "失败" };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,65 +1,77 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
public class ExceptionsController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// 显示所有异常
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<Exceptions> Get([FromUri]QueryExceptionOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public IEnumerable<string> Post()
|
||||
{
|
||||
var filePath = HttpContext.Current.Server.MapPath("~/App_Data/ErrorLog");
|
||||
return Directory.GetFiles(filePath)
|
||||
.Where(f => Path.GetExtension(f).Equals(".log", System.StringComparison.OrdinalIgnoreCase))
|
||||
.Select(f => Path.GetFileNameWithoutExtension(f)).OrderByDescending(s => s);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public string Put([FromBody]string fileName)
|
||||
{
|
||||
var logName = HttpContext.Current.Server.MapPath(string.Format("~/App_Data/ErrorLog/{0}.log", fileName));
|
||||
if (!File.Exists(logName)) return "无此日志文件";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
using (StreamReader reader = new StreamReader(logName))
|
||||
{
|
||||
while (!reader.EndOfStream)
|
||||
{
|
||||
var line = reader.ReadLine().Replace("<", "<").Replace(">", ">");
|
||||
if (line == "General Information ") sb.AppendFormat("<h4><b>{0}</b></h4>", line);
|
||||
else if (line.StartsWith("TimeStamp:")) sb.AppendFormat("<div class='logTs'>{0}</div>", line);
|
||||
else if (line.EndsWith("Exception Information")) sb.AppendFormat("<div class='logExcep'>{0}</div>", line);
|
||||
else if (line.StartsWith("Message:")) sb.AppendFormat("<div class='logMsg'>{0}</div>", line);
|
||||
else if (line.StartsWith("ErrorSql:")) sb.AppendFormat("<div class='logSql'>{0}</div>", line);
|
||||
else if (line.StartsWith("Exception Type: Longbow.Data.DBAccessException")) sb.AppendFormat("<div class='logDbExcep'>{0}</div>", line);
|
||||
else if (line.StartsWith("StackTrace Information")) sb.AppendFormat("<b>{0}</b><br>", line);
|
||||
else sb.AppendFormat("{0}<br>", line);
|
||||
};
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class ExceptionsController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
/// 显示所有异常
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<Exceptions> Get(QueryExceptionOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public IEnumerable<string> Post()
|
||||
{
|
||||
var filePath = Path.Combine(AppContext.BaseDirectory, "Error");
|
||||
return Directory.GetFiles(filePath)
|
||||
.Where(f => Path.GetExtension(f).Equals(".log", System.StringComparison.OrdinalIgnoreCase))
|
||||
.Select(f => Path.GetFileNameWithoutExtension(f)).OrderByDescending(s => s);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public JsonResult Put([FromBody]ExceptionFileQuery exceptionFile)
|
||||
{
|
||||
var filePath = Path.Combine(AppContext.BaseDirectory, "Error");
|
||||
var logName = $"{Path.Combine(filePath, exceptionFile.FileName)}.log";
|
||||
if (!System.IO.File.Exists(logName)) return new JsonResult("无此日志文件");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
using (StreamReader reader = new StreamReader(logName))
|
||||
{
|
||||
while (!reader.EndOfStream)
|
||||
{
|
||||
var line = reader.ReadLine().Replace("<", "<").Replace(">", ">");
|
||||
if (line == "General Information ") sb.AppendFormat("<h4><b>{0}</b></h4>", line);
|
||||
else if (line.StartsWith("TimeStamp:")) sb.AppendFormat("<div class='logTs'>{0}</div>", line);
|
||||
else if (line.EndsWith("Exception Information")) sb.AppendFormat("<div class='logExcep'>{0}</div>", line);
|
||||
else if (line.StartsWith("Message:")) sb.AppendFormat("<div class='logMsg'>{0}</div>", line);
|
||||
else if (line.StartsWith("ErrorSql:")) sb.AppendFormat("<div class='logSql'>{0}</div>", line);
|
||||
else if (line.StartsWith("Exception Type: Longbow.Data.DBAccessException")) sb.AppendFormat("<div class='logDbExcep'>{0}</div>", line);
|
||||
else if (line.StartsWith("StackTrace Information")) sb.AppendFormat("<b>{0}</b><br>", line);
|
||||
else sb.AppendFormat("{0}<br>", line);
|
||||
};
|
||||
}
|
||||
return new JsonResult(sb.ToString());
|
||||
}
|
||||
|
||||
public class ExceptionFileQuery
|
||||
{
|
||||
public string FileName { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,101 +1,105 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
public class GroupsController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<Group> Get([FromUri]QueryGroupOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Group Get(int id)
|
||||
{
|
||||
return GroupHelper.RetrieveGroups().FirstOrDefault(t => t.Id == id);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpPost]
|
||||
public bool Post([FromBody]Group value)
|
||||
{
|
||||
return GroupHelper.SaveGroup(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpDelete]
|
||||
public bool Delete([FromBody]string value)
|
||||
{
|
||||
return GroupHelper.DeleteGroup(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public IEnumerable<Group> Post(int id, [FromBody]JObject value)
|
||||
{
|
||||
var ret = new List<Group>();
|
||||
dynamic json = value;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "user":
|
||||
ret = GroupHelper.RetrieveGroupsByUserId(id).ToList();
|
||||
break;
|
||||
case "role":
|
||||
ret = GroupHelper.RetrieveGroupsByRoleId(id).ToList();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public bool Put(int id, [FromBody]JObject value)
|
||||
{
|
||||
var ret = false;
|
||||
dynamic json = value;
|
||||
string groupIds = json.groupIds;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "user":
|
||||
ret = GroupHelper.SaveGroupsByUserId(id, groupIds);
|
||||
break;
|
||||
case "role":
|
||||
ret = GroupHelper.SaveGroupsByRoleId(id, groupIds);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class GroupsController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<Group> Get(QueryGroupOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
public Group Get(int id)
|
||||
{
|
||||
return GroupHelper.RetrieveGroups().FirstOrDefault(t => t.Id == id);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpPost]
|
||||
public bool Post(Group value)
|
||||
{
|
||||
return GroupHelper.SaveGroup(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpDelete]
|
||||
public bool Delete(string value)
|
||||
{
|
||||
return GroupHelper.DeleteGroup(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("{id}")]
|
||||
public IEnumerable<Group> Post(int id, JObject value)
|
||||
{
|
||||
var ret = new List<Group>();
|
||||
dynamic json = value;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "user":
|
||||
ret = GroupHelper.RetrieveGroupsByUserId(id).ToList();
|
||||
break;
|
||||
case "role":
|
||||
ret = GroupHelper.RetrieveGroupsByRoleId(id).ToList();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("{id}")]
|
||||
public bool Put(int id, JObject value)
|
||||
{
|
||||
var ret = false;
|
||||
dynamic json = value;
|
||||
string groupIds = json.groupIds;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "user":
|
||||
ret = GroupHelper.SaveGroupsByUserId(id, groupIds);
|
||||
break;
|
||||
case "role":
|
||||
ret = GroupHelper.SaveGroupsByRoleId(id, groupIds);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
public class HomeController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
/// 获得当前样式接口
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public JsonResult Get()
|
||||
{
|
||||
return new JsonResult(DictHelper.RetrieveActiveCss().FirstOrDefault().Code);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获得网站所有样式表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public IEnumerable<BootstrapDict> Post()
|
||||
{
|
||||
return DictHelper.RetrieveWebCss();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,56 +1,57 @@
|
|||
using Bootstrap.Security;
|
||||
using Bootstrap.Security.Mvc;
|
||||
using Longbow.Caching;
|
||||
using Longbow.Security.Principal;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
using System.Web.Security;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LoginController : ApiController
|
||||
{
|
||||
[HttpGet]
|
||||
public LoginInfo Get()
|
||||
{
|
||||
var token = Request.Headers.GetValues("Token").First();
|
||||
return new LoginInfo() { UserName = User.Identity.Name, Token = token };
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
public LoginInfo Post([FromBody]JObject value)
|
||||
{
|
||||
dynamic user = value;
|
||||
string userName = user.userName;
|
||||
string password = user.password;
|
||||
if (LgbPrincipal.Authenticate(userName, password) || BootstrapUser.Authenticate(userName, password))
|
||||
{
|
||||
var token = CacheManager.AddOrUpdate(string.Format("WebApi-{0}", userName), k => new LoginInfo() { UserName = userName, Token = Guid.NewGuid().ToString() }, (k, info) => info, "WebApi");
|
||||
CacheManager.AddOrUpdate(token.Token, k => token, (k, info) => info, "Token");
|
||||
return token;
|
||||
}
|
||||
return new LoginInfo() { UserName = userName };
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpOptions]
|
||||
public string Options()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Cache;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class LoginController : Controller
|
||||
{
|
||||
[HttpGet]
|
||||
public object Get()
|
||||
{
|
||||
var token = Request.Headers["Token"];
|
||||
return new { UserName = User.Identity.Name, Token = token };
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
public object Post(JObject value)
|
||||
{
|
||||
dynamic user = value;
|
||||
string userName = user.userName;
|
||||
string password = user.password;
|
||||
if (BootstrapUser.Authenticate(userName, password))
|
||||
{
|
||||
var token = CacheManager.AddOrUpdate(string.Format("WebApi-{0}", userName), k => new { UserName = userName, Token = Guid.NewGuid().ToString() }, (k, info) => info, "WebApi");
|
||||
CacheManager.AddOrUpdate(token.Token, k => token, (k, info) => info, "Token");
|
||||
return token;
|
||||
}
|
||||
return new { UserName = userName };
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpOptions]
|
||||
public string Options()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,43 +1,46 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
public class LogsController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<Log> Get([FromUri]QueryLogOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Log Get(int id)
|
||||
{
|
||||
return LogHelper.RetrieveLogs().FirstOrDefault(t => t.Id == id);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public bool Post([FromBody]Log value)
|
||||
{
|
||||
var request = HttpContext.Current.Request;
|
||||
value.ClientAgent = request.UserAgent;
|
||||
value.ClientIp = request.UserHostAddress;
|
||||
value.UserName = HttpContext.Current.User.Identity.Name;
|
||||
return LogHelper.SaveLog(value);
|
||||
}
|
||||
}
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class LogsController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<Log> Get(QueryLogOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
public Log Get(int id)
|
||||
{
|
||||
return LogHelper.RetrieveLogs().FirstOrDefault(t => t.Id == id);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public bool Post(Log value)
|
||||
{
|
||||
var request = Request;
|
||||
//value.ClientAgent = request.UserAgent;
|
||||
//value.ClientIp = request.UserHostAddress;
|
||||
value.UserName = User.Identity.Name;
|
||||
return LogHelper.SaveLog(value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,89 +1,93 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
public class MenusController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<BootstrapMenu> Get([FromUri]QueryMenuOption value)
|
||||
{
|
||||
return value.RetrieveData(User.Identity.Name);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpPost]
|
||||
public bool Post([FromBody]BootstrapMenu value)
|
||||
{
|
||||
return MenuHelper.SaveMenu(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpDelete]
|
||||
public bool Delete([FromBody]string value)
|
||||
{
|
||||
return MenuHelper.DeleteMenu(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public IEnumerable<BootstrapMenu> Post(int id, [FromBody]JObject value)
|
||||
{
|
||||
var ret = new List<BootstrapMenu>();
|
||||
dynamic json = value;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "role":
|
||||
ret = MenuHelper.RetrieveMenusByRoleId(id).ToList();
|
||||
break;
|
||||
case "user":
|
||||
ret = BootstrapMenu.RetrieveAllMenus(User.Identity.Name).ToList();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public bool Put(int id, [FromBody]JObject value)
|
||||
{
|
||||
var ret = false;
|
||||
dynamic json = value;
|
||||
string menuIds = json.menuIds.ToString();
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "role":
|
||||
ret = MenuHelper.SaveMenusByRoleId(id, menuIds);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class MenusController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<BootstrapMenu> Get(QueryMenuOption value)
|
||||
{
|
||||
return value.RetrieveData(User.Identity.Name);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpPost]
|
||||
public bool Post(BootstrapMenu value)
|
||||
{
|
||||
return MenuHelper.SaveMenu(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpDelete]
|
||||
public bool Delete(string value)
|
||||
{
|
||||
return MenuHelper.DeleteMenu(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("{id}")]
|
||||
public IEnumerable<BootstrapMenu> Post(int id, JObject value)
|
||||
{
|
||||
var ret = new List<BootstrapMenu>();
|
||||
dynamic json = value;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "role":
|
||||
ret = MenuHelper.RetrieveMenusByRoleId(id).ToList();
|
||||
break;
|
||||
case "user":
|
||||
ret = BootstrapMenu.RetrieveAllMenus(User.Identity.Name).ToList();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("{id}")]
|
||||
public bool Put(int id, JObject value)
|
||||
{
|
||||
var ret = false;
|
||||
dynamic json = value;
|
||||
string menuIds = json.menuIds.ToString();
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "role":
|
||||
ret = MenuHelper.SaveMenusByRoleId(id, menuIds);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,56 +1,60 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
public class MessagesController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据Id返回不同的消息列表
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public IEnumerable<Message> Get(string id)
|
||||
{
|
||||
var ret = new List<Message>();
|
||||
switch (id)
|
||||
{
|
||||
case "inbox":
|
||||
ret = MessageHelper.Inbox(User.Identity.Name).ToList();
|
||||
break;
|
||||
case "sendmail":
|
||||
ret = MessageHelper.SendMail(User.Identity.Name).ToList();
|
||||
break;
|
||||
case "mark":
|
||||
ret = MessageHelper.Mark(User.Identity.Name).ToList();
|
||||
break;
|
||||
case "trash":
|
||||
ret = MessageHelper.Trash(User.Identity.Name).ToList();
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回各个消息列表的文件个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public MessageCountModel Get()
|
||||
{
|
||||
var mcm = new MessageCountModel
|
||||
{
|
||||
InboxCount = MessageHelper.Inbox(User.Identity.Name).Count(),
|
||||
SendmailCount = MessageHelper.SendMail(User.Identity.Name).Count(),
|
||||
MarkCount = MessageHelper.Mark(User.Identity.Name).Count(),
|
||||
TrashCount = MessageHelper.Trash(User.Identity.Name).Count()
|
||||
};
|
||||
return mcm;
|
||||
}
|
||||
}
|
||||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class MessagesController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据Id返回不同的消息列表
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
public IEnumerable<Message> Get(string id)
|
||||
{
|
||||
var ret = new List<Message>();
|
||||
switch (id)
|
||||
{
|
||||
case "inbox":
|
||||
ret = MessageHelper.Inbox(User.Identity.Name).ToList();
|
||||
break;
|
||||
case "sendmail":
|
||||
ret = MessageHelper.SendMail(User.Identity.Name).ToList();
|
||||
break;
|
||||
case "mark":
|
||||
ret = MessageHelper.Mark(User.Identity.Name).ToList();
|
||||
break;
|
||||
case "trash":
|
||||
ret = MessageHelper.Trash(User.Identity.Name).ToList();
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回各个消息列表的文件个数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public MessageCountModel Get()
|
||||
{
|
||||
var mcm = new MessageCountModel
|
||||
{
|
||||
InboxCount = MessageHelper.Inbox(User.Identity.Name).Count(),
|
||||
SendmailCount = MessageHelper.SendMail(User.Identity.Name).Count(),
|
||||
MarkCount = MessageHelper.Mark(User.Identity.Name).Count(),
|
||||
TrashCount = MessageHelper.Trash(User.Identity.Name).Count()
|
||||
};
|
||||
return mcm;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,136 +1,140 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
using System.Linq;
|
||||
using System;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
public class NotificationsController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Notifications Get()
|
||||
{
|
||||
var ret = new Notifications();
|
||||
// New Users
|
||||
var user = UserHelper.RetrieveNewUsers();
|
||||
ret.Users = user.Take(6).ToList();
|
||||
ret.Users.AsParallel().ForAll(n =>
|
||||
{
|
||||
var ts = DateTime.Now - n.RegisterTime;
|
||||
if (ts.TotalMinutes < 5) n.Period = "刚刚";
|
||||
else if (ts.Days > 0) n.Period = string.Format("{0}天", ts.Days);
|
||||
else if (ts.Hours > 0) n.Period = string.Format("{0}小时", ts.Hours);
|
||||
else if (ts.Minutes > 0) n.Period = string.Format("{0}分钟", ts.Minutes);
|
||||
});
|
||||
ret.NewUsersCount = user.Count();
|
||||
|
||||
// Tasks
|
||||
var task = TaskHelper.RetrieveTasks();
|
||||
ret.Tasks = task.Take(6).ToList();
|
||||
ret.TasksCount = task.Count();
|
||||
|
||||
//Message
|
||||
var message = MessageHelper.RetrieveMessagesHeader(User.Identity.Name);
|
||||
ret.Messages = message.Take(6).ToList();
|
||||
ret.Messages.AsParallel().ForAll(m => m.FromIcon = Url.Content(m.FromIcon));
|
||||
ret.MessagesCount = message.Count();
|
||||
|
||||
//Apps
|
||||
var apps = ExceptionHelper.RetrieveExceptions().Where(n => n.ExceptionType != "Longbow.Data.DBAccessException");
|
||||
ret.Apps = apps.Take(6).ToList();
|
||||
ret.Apps.AsParallel().ForAll(n =>
|
||||
{
|
||||
n.ExceptionType = n.ExceptionType.Split('.').Last();
|
||||
var ts = DateTime.Now - n.LogTime;
|
||||
if (ts.TotalMinutes < 5) n.Period = "刚刚";
|
||||
else if (ts.Days > 0) n.Period = string.Format("{0}天", ts.Days);
|
||||
else if (ts.Hours > 0) n.Period = string.Format("{0}小时", ts.Hours);
|
||||
else if (ts.Minutes > 0) n.Period = string.Format("{0}分钟", ts.Minutes);
|
||||
});
|
||||
ret.AppExceptionsCount = apps.Count();
|
||||
|
||||
//Dbs
|
||||
var dbs = ExceptionHelper.RetrieveExceptions().Where(n => n.ExceptionType == "Longbow.Data.DBAccessException");
|
||||
ret.Dbs = dbs.Take(6).ToList();
|
||||
ret.Dbs.AsParallel().ForAll(n =>
|
||||
{
|
||||
var ts = DateTime.Now - n.LogTime;
|
||||
if (ts.TotalMinutes < 5) n.Period = "刚刚";
|
||||
else if (ts.Days > 0) n.Period = string.Format("{0}天", ts.Days);
|
||||
else if (ts.Hours > 0) n.Period = string.Format("{0}小时", ts.Hours);
|
||||
else if (ts.Minutes > 0) n.Period = string.Format("{0}分钟", ts.Minutes);
|
||||
});
|
||||
ret.DbExceptionsCount = dbs.Count();
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Notifications Get(string id)
|
||||
{
|
||||
var ret = new Notifications();
|
||||
if (id == "newusers" || id == "all") ret.Users = UserHelper.RetrieveNewUsers().OrderByDescending(u => u.RegisterTime).ToList();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
public Notifications()
|
||||
{
|
||||
Users = new List<User>();
|
||||
Apps = new List<Exceptions>();
|
||||
Dbs = new List<Exceptions>();
|
||||
Tasks = new List<Task>();
|
||||
Messages = new List<Message>();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<User> Users { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Exceptions> Apps { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Exceptions> Dbs { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Task> Tasks { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Message> Messages { get; set; }
|
||||
/// <summary>
|
||||
/// 获得/设置 消息数量
|
||||
/// </summary>
|
||||
public int MessagesCount { get; set; }
|
||||
/// <summary>
|
||||
/// 获得/设置 新用户数量
|
||||
/// </summary>
|
||||
public int NewUsersCount { get; set; }
|
||||
/// <summary>
|
||||
/// 获取/设置 任务数量
|
||||
/// </summary>
|
||||
public int TasksCount { get; set; }
|
||||
/// <summary>
|
||||
/// 获取/设置 应用程序错误数量
|
||||
/// </summary>
|
||||
public int AppExceptionsCount { get; set; }
|
||||
/// <summary>
|
||||
/// 获取/设置 数据库错误数量
|
||||
/// </summary>
|
||||
public int DbExceptionsCount { get; set; }
|
||||
}
|
||||
}
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class NotificationsController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Notifications Get()
|
||||
{
|
||||
var ret = new Notifications();
|
||||
// New Users
|
||||
var user = UserHelper.RetrieveNewUsers();
|
||||
ret.Users = user.Take(6).ToList();
|
||||
ret.Users.AsParallel().ForAll(n =>
|
||||
{
|
||||
var ts = DateTime.Now - n.RegisterTime;
|
||||
if (ts.TotalMinutes < 5) n.Period = "刚刚";
|
||||
else if (ts.Days > 0) n.Period = string.Format("{0}天", ts.Days);
|
||||
else if (ts.Hours > 0) n.Period = string.Format("{0}小时", ts.Hours);
|
||||
else if (ts.Minutes > 0) n.Period = string.Format("{0}分钟", ts.Minutes);
|
||||
});
|
||||
ret.NewUsersCount = user.Count();
|
||||
|
||||
// Tasks
|
||||
var task = TaskHelper.RetrieveTasks();
|
||||
ret.Tasks = task.Take(6).ToList();
|
||||
ret.TasksCount = task.Count();
|
||||
|
||||
//Message
|
||||
var message = MessageHelper.RetrieveMessagesHeader(User.Identity.Name);
|
||||
ret.Messages = message.Take(6).ToList();
|
||||
ret.Messages.AsParallel().ForAll(m => m.FromIcon = Url.Content(m.FromIcon));
|
||||
ret.MessagesCount = message.Count();
|
||||
|
||||
//Apps
|
||||
var apps = ExceptionHelper.RetrieveExceptions().Where(n => n.ExceptionType != "Longbow.Data.DBAccessException");
|
||||
ret.Apps = apps.Take(6).ToList();
|
||||
ret.Apps.AsParallel().ForAll(n =>
|
||||
{
|
||||
n.ExceptionType = n.ExceptionType.Split('.').Last();
|
||||
var ts = DateTime.Now - n.LogTime;
|
||||
if (ts.TotalMinutes < 5) n.Period = "刚刚";
|
||||
else if (ts.Days > 0) n.Period = string.Format("{0}天", ts.Days);
|
||||
else if (ts.Hours > 0) n.Period = string.Format("{0}小时", ts.Hours);
|
||||
else if (ts.Minutes > 0) n.Period = string.Format("{0}分钟", ts.Minutes);
|
||||
});
|
||||
ret.AppExceptionsCount = apps.Count();
|
||||
|
||||
//Dbs
|
||||
var dbs = ExceptionHelper.RetrieveExceptions().Where(n => n.ExceptionType == "Longbow.Data.DBAccessException");
|
||||
ret.Dbs = dbs.Take(6).ToList();
|
||||
ret.Dbs.AsParallel().ForAll(n =>
|
||||
{
|
||||
var ts = DateTime.Now - n.LogTime;
|
||||
if (ts.TotalMinutes < 5) n.Period = "刚刚";
|
||||
else if (ts.Days > 0) n.Period = string.Format("{0}天", ts.Days);
|
||||
else if (ts.Hours > 0) n.Period = string.Format("{0}小时", ts.Hours);
|
||||
else if (ts.Minutes > 0) n.Period = string.Format("{0}分钟", ts.Minutes);
|
||||
});
|
||||
ret.DbExceptionsCount = dbs.Count();
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
public Notifications Get(string id)
|
||||
{
|
||||
var ret = new Notifications();
|
||||
if (id == "newusers" || id == "all") ret.Users = UserHelper.RetrieveNewUsers().OrderByDescending(u => u.RegisterTime).ToList();
|
||||
return ret;
|
||||
}
|
||||
|
||||
public class Notifications
|
||||
{
|
||||
public Notifications()
|
||||
{
|
||||
Users = new List<User>();
|
||||
Apps = new List<Exceptions>();
|
||||
Dbs = new List<Exceptions>();
|
||||
Tasks = new List<Task>();
|
||||
Messages = new List<Message>();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<User> Users { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Exceptions> Apps { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Exceptions> Dbs { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Task> Tasks { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Message> Messages { get; set; }
|
||||
/// <summary>
|
||||
/// 获得/设置 消息数量
|
||||
/// </summary>
|
||||
public int MessagesCount { get; set; }
|
||||
/// <summary>
|
||||
/// 获得/设置 新用户数量
|
||||
/// </summary>
|
||||
public int NewUsersCount { get; set; }
|
||||
/// <summary>
|
||||
/// 获取/设置 任务数量
|
||||
/// </summary>
|
||||
public int TasksCount { get; set; }
|
||||
/// <summary>
|
||||
/// 获取/设置 应用程序错误数量
|
||||
/// </summary>
|
||||
public int AppExceptionsCount { get; set; }
|
||||
/// <summary>
|
||||
/// 获取/设置 数据库错误数量
|
||||
/// </summary>
|
||||
public int DbExceptionsCount { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Logging;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class ProfilesController : Controller
|
||||
{
|
||||
[HttpPost]
|
||||
public string Post()
|
||||
{
|
||||
var ret = string.Empty;
|
||||
var userName = User.Identity.Name;
|
||||
if (User.IsInRole("Administrators")) userName = "default";
|
||||
//var files = HttpContext.Request.Files;
|
||||
//if (files.Count > 0)
|
||||
//{
|
||||
// var webSiteUrl = DictHelper.RetrieveIconFolderPath().Code;
|
||||
// var fileName = string.Format("{0}{1}", userName, Path.GetExtension(files[0].FileName));
|
||||
// var fileUrl = string.Format("{0}{1}", webSiteUrl, fileName);
|
||||
// var filePath = HttpContext.Current.Server.MapPath(fileUrl);
|
||||
// var fileFolder = Path.GetDirectoryName(filePath);
|
||||
// try
|
||||
// {
|
||||
// if (!Directory.Exists(fileFolder)) Directory.CreateDirectory(fileFolder);
|
||||
// files[0].SaveAs(filePath);
|
||||
// ret = string.Format("{0}?q={1}", Url.Content(fileUrl), DateTime.Now.Ticks);
|
||||
// UserHelper.SaveUserIconByName(userName, fileName);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// var nv = new NameValueCollection();
|
||||
// nv.Add("UpLoadFileName", filePath);
|
||||
// ExceptionManager.Publish(ex, nv);
|
||||
// }
|
||||
//}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,98 +1,102 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
public class RolesController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<Role> Get([FromUri]QueryRoleOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public IEnumerable<Role> Post(int id, [FromBody]JObject value)
|
||||
{
|
||||
var ret = new List<Role>();
|
||||
dynamic json = value;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "user":
|
||||
ret = RoleHelper.RetrieveRolesByUserId(id).ToList();
|
||||
break;
|
||||
case "group":
|
||||
ret = RoleHelper.RetrieveRolesByGroupId(id).ToList();
|
||||
break;
|
||||
case "menu":
|
||||
ret = RoleHelper.RetrieveRolesByMenuId(id).ToList();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>根据GroupID获取
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public bool Put(int id, [FromBody]JObject value)
|
||||
{
|
||||
var ret = false;
|
||||
dynamic json = value;
|
||||
string roleIds = json.roleIds;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "user":
|
||||
ret = RoleHelper.SaveRolesByUserId(id, roleIds);
|
||||
break;
|
||||
case "group":
|
||||
ret = RoleHelper.SaveRolesByGroupId(id, roleIds);
|
||||
break;
|
||||
case "menu":
|
||||
ret = RoleHelper.SavaRolesByMenuId(id, roleIds);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpPost]
|
||||
public bool Post([FromBody]Role value)
|
||||
{
|
||||
return RoleHelper.SaveRole(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpDelete]
|
||||
public bool Delete([FromBody]string value)
|
||||
{
|
||||
return RoleHelper.DeleteRole(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class RolesController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<Role> Get(QueryRoleOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("{id}")]
|
||||
public IEnumerable<Role> Post(int id, JObject value)
|
||||
{
|
||||
var ret = new List<Role>();
|
||||
dynamic json = value;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "user":
|
||||
ret = RoleHelper.RetrieveRolesByUserId(id).ToList();
|
||||
break;
|
||||
case "group":
|
||||
ret = RoleHelper.RetrieveRolesByGroupId(id).ToList();
|
||||
break;
|
||||
case "menu":
|
||||
ret = RoleHelper.RetrieveRolesByMenuId(id).ToList();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>根据GroupID获取
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("{id}")]
|
||||
public bool Put(int id, JObject value)
|
||||
{
|
||||
var ret = false;
|
||||
dynamic json = value;
|
||||
string roleIds = json.roleIds;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "user":
|
||||
ret = RoleHelper.SaveRolesByUserId(id, roleIds);
|
||||
break;
|
||||
case "group":
|
||||
ret = RoleHelper.SaveRolesByGroupId(id, roleIds);
|
||||
break;
|
||||
case "menu":
|
||||
ret = RoleHelper.SavaRolesByMenuId(id, roleIds);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpPost]
|
||||
public bool Post(Role value)
|
||||
{
|
||||
return RoleHelper.SaveRole(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpDelete]
|
||||
public bool Delete(string value)
|
||||
{
|
||||
return RoleHelper.DeleteRole(value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,38 +1,38 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Caching.Configuration;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SettingsController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public bool Post([FromBody]JObject value)
|
||||
{
|
||||
//保存个性化设置
|
||||
dynamic json = value;
|
||||
return DictHelper.SaveSettings((string)json.name, (string)json.code, (string)json.category);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpGet]
|
||||
public IEnumerable<CacheListElement> Get([FromUri]JObject value)
|
||||
{
|
||||
var section = CacheListSection.GetSection();
|
||||
return section.Items.Where(item => item.Enabled);
|
||||
}
|
||||
}
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Cache;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class SettingsController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public bool Post(JObject value)
|
||||
{
|
||||
//保存个性化设置
|
||||
dynamic json = value;
|
||||
return DictHelper.SaveSettings((string)json.name, (string)json.code, (string)json.category);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpGet]
|
||||
public IEnumerable<ICacheCorsItem> Get()
|
||||
{
|
||||
return CacheManager.CorsSites;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +1,18 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class TasksController : ApiController
|
||||
[Route("api/[controller]")]
|
||||
public class TasksController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public IEnumerable<Task> Get()
|
|
@ -1,158 +1,159 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Security.Principal;
|
||||
using Longbow.Web.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UsersController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<User> Get([FromUri]QueryUserOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public bool Put([FromBody]User value)
|
||||
{
|
||||
if(value.UserStatus == 3)
|
||||
{
|
||||
return UserHelper.SaveUserCssByName(value.UserName, value.Css);
|
||||
}
|
||||
if (value.UserStatus == 9)
|
||||
{
|
||||
// vlaidate userName
|
||||
return BootstrapUser.RetrieveUserByUserName(value.UserName) == null && !UserHelper.RetrieveNewUsers().Any(u => u.UserName == value.UserName);
|
||||
}
|
||||
var ret = false;
|
||||
if (value.UserName.Equals(User.Identity.Name, System.StringComparison.OrdinalIgnoreCase) || LgbPrincipal.IsAdmin(User))
|
||||
{
|
||||
if (value.UserStatus == 1)
|
||||
ret = BootstrapUser.SaveUserInfoByName(value.UserName, value.DisplayName);
|
||||
else if (value.UserStatus == 2)
|
||||
ret = BootstrapUser.ChangePassword(value.UserName, value.Password, value.NewPassword);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public IEnumerable<User> Post(int id, [FromBody]JObject value)
|
||||
{
|
||||
var ret = new List<User>();
|
||||
dynamic json = value;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "role":
|
||||
ret = UserHelper.RetrieveUsersByRoleId(id).ToList();
|
||||
break;
|
||||
case "group":
|
||||
ret = UserHelper.RetrieveUsersByGroupId(id).ToList();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="userName"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public BootstrapUser Get(string userName)
|
||||
{
|
||||
return BootstrapUser.RetrieveUserByUserName(userName);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpPost]
|
||||
public bool Post([FromBody]User value)
|
||||
{
|
||||
value.Description = string.Format("管理员{0}创建用户", User.Identity.Name);
|
||||
value.ApprovedBy = User.Identity.Name;
|
||||
return UserHelper.SaveUser(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public bool Put(int id, [FromBody]JObject value)
|
||||
{
|
||||
var ret = false;
|
||||
dynamic json = value;
|
||||
string userIds = json.userIds;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "role":
|
||||
ret = UserHelper.SaveUsersByRoleId(id, userIds);
|
||||
break;
|
||||
case "group":
|
||||
ret = UserHelper.SaveUsersByGroupId(id, userIds);
|
||||
break;
|
||||
case "user":
|
||||
// 此时 userIds 存储的信息是操作结果 1 标示同意 0 标示拒绝
|
||||
var user = new User() { Id = id, UserStatus = 2 };
|
||||
if (userIds == "1")
|
||||
{
|
||||
user.ApprovedBy = User.Identity.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
user.RejectedReason = "无原因";
|
||||
user.RejectedBy = User.Identity.Name;
|
||||
}
|
||||
ret = UserHelper.SaveUser(user);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpDelete]
|
||||
public bool Delete([FromBody]string value)
|
||||
{
|
||||
return UserHelper.DeleteUser(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpOptions]
|
||||
public string Options()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
using Bootstrap.Admin.Query;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class UsersController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<User> Get(QueryUserOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public bool Put(User value)
|
||||
{
|
||||
if(value.UserStatus == 3)
|
||||
{
|
||||
return UserHelper.SaveUserCssByName(value.UserName, value.Css);
|
||||
}
|
||||
if (value.UserStatus == 9)
|
||||
{
|
||||
// vlaidate userName
|
||||
return BootstrapUser.RetrieveUserByUserName(value.UserName) == null && !UserHelper.RetrieveNewUsers().Any(u => u.UserName == value.UserName);
|
||||
}
|
||||
var ret = false;
|
||||
if (value.UserName.Equals(User.Identity.Name, System.StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (value.UserStatus == 1)
|
||||
ret = BootstrapUser.SaveUserInfoByName(value.UserName, value.DisplayName);
|
||||
else if (value.UserStatus == 2)
|
||||
ret = BootstrapUser.ChangePassword(value.UserName, value.Password, value.NewPassword);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("{id}")]
|
||||
public IEnumerable<User> Post(int id, JObject value)
|
||||
{
|
||||
var ret = new List<User>();
|
||||
dynamic json = value;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "role":
|
||||
ret = UserHelper.RetrieveUsersByRoleId(id).ToList();
|
||||
break;
|
||||
case "group":
|
||||
ret = UserHelper.RetrieveUsersByGroupId(id).ToList();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="userName"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public BootstrapUser Get(string userName)
|
||||
{
|
||||
return BootstrapUser.RetrieveUserByUserName(userName);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpPost]
|
||||
public bool Post(User value)
|
||||
{
|
||||
value.Description = string.Format("管理员{0}创建用户", User.Identity.Name);
|
||||
value.ApprovedBy = User.Identity.Name;
|
||||
return UserHelper.SaveUser(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("{id}")]
|
||||
public bool Put(int id, JObject value)
|
||||
{
|
||||
var ret = false;
|
||||
dynamic json = value;
|
||||
string userIds = json.userIds;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "role":
|
||||
ret = UserHelper.SaveUsersByRoleId(id, userIds);
|
||||
break;
|
||||
case "group":
|
||||
ret = UserHelper.SaveUsersByGroupId(id, userIds);
|
||||
break;
|
||||
case "user":
|
||||
// 此时 userIds 存储的信息是操作结果 1 标示同意 0 标示拒绝
|
||||
var user = new User() { Id = id, UserStatus = 2 };
|
||||
if (userIds == "1")
|
||||
{
|
||||
user.ApprovedBy = User.Identity.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
user.RejectedReason = "无原因";
|
||||
user.RejectedBy = User.Identity.Name;
|
||||
}
|
||||
ret = UserHelper.SaveUser(user);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpDelete]
|
||||
public bool Delete(string value)
|
||||
{
|
||||
return UserHelper.DeleteUser(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpOptions]
|
||||
public string Options()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +1,25 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
public class WSController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public List<MessageBody> Get()
|
||||
{
|
||||
return NotificationHelper.MessagePool.ToList();
|
||||
}
|
||||
}
|
||||
using Bootstrap.DataAccess;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers.Api
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Route("api/[controller]")]
|
||||
public class WSController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public List<MessageBody> Get()
|
||||
{
|
||||
return NotificationHelper.MessagePool.ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Security.Principal;
|
||||
using Longbow.Web.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
public class DictsController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public QueryData<BootstrapDict> Get([FromUri]QueryDictOption value)
|
||||
{
|
||||
return value.RetrieveData();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public BootstrapDict Get(int id)
|
||||
{
|
||||
return DictHelper.RetrieveDicts().FirstOrDefault(t => t.Id == id);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpPost]
|
||||
public bool Post([FromBody]BootstrapDict value)
|
||||
{
|
||||
return DictHelper.SaveDict(value);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public IEnumerable<BootstrapDict> Post(int id, [FromBody]JObject value)
|
||||
{
|
||||
IEnumerable<BootstrapDict> ret = new List<BootstrapDict>();
|
||||
dynamic json = value;
|
||||
switch ((string)json.type)
|
||||
{
|
||||
case "category":
|
||||
ret = DictHelper.RetrieveCategories();
|
||||
break;
|
||||
case "css":
|
||||
ret = DictHelper.RetrieveWebCss();
|
||||
break;
|
||||
case "activeCss":
|
||||
ret = DictHelper.RetrieveActiveCss();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
[HttpDelete]
|
||||
public object Delete([FromBody]string value)
|
||||
{
|
||||
if (!LgbPrincipal.IsAdmin(User)) return new { result = false, msg = "当前用户权限不够" };
|
||||
var result = DictHelper.DeleteDict(value);
|
||||
return new { result = result, msg = result ? "成功!" : "失败" };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,11 @@
|
|||
using Bootstrap.Admin.Models;
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Security.Principal;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Security;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
|
@ -18,59 +20,23 @@ namespace Bootstrap.Admin.Controllers
|
|||
/// <returns></returns>
|
||||
public ActionResult Index()
|
||||
{
|
||||
var v = new HeaderBarModel { HomeUrl = DictHelper.RetrieveHomeUrl() };
|
||||
var v = new HeaderBarModel(User.Identity) { HomeUrl = DictHelper.RetrieveHomeUrl() };
|
||||
return v.HomeUrl.StartsWith("~/") ? (ActionResult)View(v) : Redirect(v.HomeUrl);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ActionResult Lock()
|
||||
public async Task<IActionResult> Lock()
|
||||
{
|
||||
FormsAuthentication.SignOut();
|
||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
var user = BootstrapUser.RetrieveUserByUserName(User.Identity.Name);
|
||||
return View(new LockModel
|
||||
{
|
||||
UserName = user.UserName,
|
||||
DisplayName = user.DisplayName,
|
||||
ReturnUrl = Url.Encode(Request.UrlReferrer == null ? FormsAuthentication.DefaultUrl : Request.UrlReferrer.AbsoluteUri)
|
||||
ReturnUrl = Request.Path
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="login"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public ActionResult Login(LoginModel login)
|
||||
{
|
||||
FormsAuthentication.SignOut();
|
||||
if (!string.IsNullOrEmpty(login.UserName) && (LgbPrincipal.Authenticate(login.UserName, login.Password) || BootstrapUser.Authenticate(login.UserName, login.Password)))
|
||||
{
|
||||
FormsAuthentication.RedirectFromLoginPage(login.UserName, login.Remember == "true");
|
||||
return new EmptyResult();
|
||||
}
|
||||
return View(login);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public ActionResult Register(User p)
|
||||
{
|
||||
if (string.IsNullOrEmpty(p.UserName) || string.IsNullOrEmpty(p.Password) || string.IsNullOrEmpty(p.DisplayName) || string.IsNullOrEmpty(p.Description)) return View();
|
||||
p.UserStatus = 1;
|
||||
return UserHelper.SaveUser(p) ? (ActionResult)Redirect("~/Content/html/RegResult.html") : View();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public ActionResult Mobile()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.ExceptionManagement;
|
||||
using Longbow.Security.Principal;
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Bootstrap.Admin.Controllers
|
||||
{
|
||||
public class ProfilesController : ApiController
|
||||
{
|
||||
[HttpPost]
|
||||
public string Post()
|
||||
{
|
||||
var ret = string.Empty;
|
||||
var userName = User.Identity.Name;
|
||||
if (LgbPrincipal.IsWebAdmin(userName)) userName = "default";
|
||||
var files = HttpContext.Current.Request.Files;
|
||||
if (files.Count > 0)
|
||||
{
|
||||
var webSiteUrl = DictHelper.RetrieveIconFolderPath().Code;
|
||||
var fileName = string.Format("{0}{1}", userName, Path.GetExtension(files[0].FileName));
|
||||
var fileUrl = string.Format("{0}{1}", webSiteUrl, fileName);
|
||||
var filePath = HttpContext.Current.Server.MapPath(fileUrl);
|
||||
var fileFolder = Path.GetDirectoryName(filePath);
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(fileFolder)) Directory.CreateDirectory(fileFolder);
|
||||
files[0].SaveAs(filePath);
|
||||
ret = string.Format("{0}?q={1}", Url.Content(fileUrl), DateTime.Now.Ticks);
|
||||
UserHelper.SaveUserIconByName(userName, fileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var nv = new NameValueCollection();
|
||||
nv.Add("UpLoadFileName", filePath);
|
||||
ExceptionManager.Publish(ex, nv);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ Application Codebehind="Global.asax.cs" Inherits="Bootstrap.Admin.Global" Language="C#" %>
|
|
@ -1,20 +0,0 @@
|
|||
using System;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace Bootstrap.Admin
|
||||
{
|
||||
public class Global : HttpApplication
|
||||
{
|
||||
void Application_Start(object sender, EventArgs e)
|
||||
{
|
||||
// Code that runs on application startup
|
||||
AreaRegistration.RegisterAllAreas();
|
||||
GlobalConfiguration.Configure(WebApiConfig.Register);
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using System.Security.Principal;
|
||||
using System.Web;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
|
@ -9,9 +10,9 @@ namespace Bootstrap.Admin.Models
|
|||
/// </summary>
|
||||
public class HeaderBarModel : ModelBase
|
||||
{
|
||||
public HeaderBarModel()
|
||||
public HeaderBarModel(IIdentity identity)
|
||||
{
|
||||
var user = BootstrapUser.RetrieveUserByUserName(HttpContext.Current.User.Identity.Name);
|
||||
var user = BootstrapUser.RetrieveUserByUserName(identity.Name);
|
||||
Icon = user.Icon;
|
||||
DisplayName = user.DisplayName;
|
||||
UserName = user.UserName;
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
public class NavigatorBarModel : HeaderBarModel
|
||||
{
|
||||
public NavigatorBarModel(string url)
|
||||
public NavigatorBarModel(ControllerBase controller) : base(controller.User.Identity)
|
||||
{
|
||||
Navigations = BootstrapMenu.RetrieveSystemMenus(UserName, url);
|
||||
Navigations = BootstrapMenu.RetrieveSystemMenus(UserName, $"~/{controller.ControllerContext.ActionDescriptor.ControllerName}/{controller.ControllerContext.ActionDescriptor.ActionName}");
|
||||
Applications = DictHelper.RetrieveApps();
|
||||
HomeUrl = "~/Admin/Index";
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
|
@ -22,10 +23,11 @@ namespace Bootstrap.Admin.Models
|
|||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
public ProfilesModel(string url) : base(url)
|
||||
/// <param name="controller"></param>
|
||||
public ProfilesModel(ControllerBase controller) : base(controller)
|
||||
{
|
||||
var fileName = HttpContext.Current.Server.MapPath(Icon);
|
||||
// TODO: 找到MapPath方法
|
||||
var fileName = AppContext.BaseDirectory + Icon;
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
Size = new FileInfo(fileName).Length;
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
|
||||
namespace Bootstrap.Admin
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
BuildWebHost(args).Run();
|
||||
}
|
||||
|
||||
public static IWebHost BuildWebHost(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.ConfigureAppConfiguration(builder => builder.SetBasePath(AppContext.BaseDirectory).AddJsonFile("cache.json", true, true))
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
#if DEBUG
|
||||
[assembly: AssemblyTitle("Bootstrap.Admin Debug Version")]
|
||||
#else
|
||||
[assembly: AssemblyTitle("Bootstrap.Admin Release Version")]
|
||||
#endif
|
||||
[assembly: AssemblyDescription("Bootstrap.Admin Web Component")]
|
||||
//[assembly: AssemblyConfiguration("")]
|
||||
//[assembly: AssemblyCompany("")]
|
||||
//[assembly: AssemblyProduct("Bootstrap.DataAccess")]
|
||||
//[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
//[assembly: AssemblyTrademark("")]
|
||||
//[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: CLSCompliant(true)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("7b2b7043-3cb2-4c5a-bdf2-8c47f1a5471a")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
//[assembly: AssemblyVersion("1.0.0.0")]
|
||||
//[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:50852/",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"Bootstrap.Admin": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "http://localhost:50853/"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,65 +1,65 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
public class QueryDictOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
/// 字典分项
|
||||
/// </summary>
|
||||
public string Category { get; set; }
|
||||
/// <summary>
|
||||
/// 字典名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 字典种类
|
||||
/// </summary>
|
||||
public string Define { get; set; }
|
||||
/// <summary>
|
||||
/// 字典表查询
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public QueryData<BootstrapDict> RetrieveData()
|
||||
{
|
||||
var data = DictHelper.RetrieveDicts();
|
||||
if (!string.IsNullOrEmpty(Category))
|
||||
{
|
||||
data = data.Where(t => t.Category.Contains(Category));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Name))
|
||||
{
|
||||
data = data.Where(t => t.Name.Contains(Name));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Define))
|
||||
{
|
||||
data = data.Where(t => t.Define.ToString() == Define);
|
||||
}
|
||||
var ret = new QueryData<BootstrapDict>();
|
||||
ret.total = data.Count();
|
||||
// 通过option.Sort属性判断对那列进行排序
|
||||
switch (Sort)
|
||||
{
|
||||
case "Category":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Category) : data.OrderByDescending(t => t.Category);
|
||||
break;
|
||||
case "Name":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Name) : data.OrderByDescending(t => t.Name);
|
||||
break;
|
||||
case "Code":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Code) : data.OrderByDescending(t => t.Code);
|
||||
break;
|
||||
case "Define":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Define) : data.OrderByDescending(t => t.Define);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
using Bootstrap.DataAccess;
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Query
|
||||
{
|
||||
public class QueryDictOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
/// 字典分项
|
||||
/// </summary>
|
||||
public string Category { get; set; }
|
||||
/// <summary>
|
||||
/// 字典名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 字典种类
|
||||
/// </summary>
|
||||
public string Define { get; set; }
|
||||
/// <summary>
|
||||
/// 字典表查询
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public QueryData<BootstrapDict> RetrieveData()
|
||||
{
|
||||
var data = DictHelper.RetrieveDicts();
|
||||
if (!string.IsNullOrEmpty(Category))
|
||||
{
|
||||
data = data.Where(t => t.Category.Contains(Category));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Name))
|
||||
{
|
||||
data = data.Where(t => t.Name.Contains(Name));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Define))
|
||||
{
|
||||
data = data.Where(t => t.Define.ToString() == Define);
|
||||
}
|
||||
var ret = new QueryData<BootstrapDict>();
|
||||
ret.total = data.Count();
|
||||
// 通过option.Sort属性判断对那列进行排序
|
||||
switch (Sort)
|
||||
{
|
||||
case "Category":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Category) : data.OrderByDescending(t => t.Category);
|
||||
break;
|
||||
case "Name":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Name) : data.OrderByDescending(t => t.Name);
|
||||
break;
|
||||
case "Code":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Code) : data.OrderByDescending(t => t.Code);
|
||||
break;
|
||||
case "Define":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Define) : data.OrderByDescending(t => t.Define);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,57 +1,57 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
public class QueryExceptionOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime StartTime { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime EndTime { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public QueryData<Exceptions> RetrieveData()
|
||||
{
|
||||
var data = ExceptionHelper.RetrieveExceptions();
|
||||
if (StartTime > DateTime.MinValue)
|
||||
{
|
||||
data = data.Where(t => t.LogTime > StartTime);
|
||||
}
|
||||
if (EndTime > DateTime.MinValue)
|
||||
{
|
||||
data = data.Where(t => t.LogTime < EndTime.AddDays(1));
|
||||
}
|
||||
var ret = new QueryData<Exceptions>();
|
||||
ret.total = data.Count();
|
||||
switch (Sort)
|
||||
{
|
||||
case "ErrorPage":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ErrorPage) : data.OrderByDescending(t => t.ErrorPage);
|
||||
break;
|
||||
case "UserID":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.UserId) : data.OrderByDescending(t => t.UserId);
|
||||
break;
|
||||
case "UserIp":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.UserIp) : data.OrderByDescending(t => t.UserIp);
|
||||
break;
|
||||
case "LogTime":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.LogTime) : data.OrderByDescending(t => t.LogTime);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Query
|
||||
{
|
||||
public class QueryExceptionOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime StartTime { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime EndTime { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public QueryData<Exceptions> RetrieveData()
|
||||
{
|
||||
var data = ExceptionHelper.RetrieveExceptions();
|
||||
if (StartTime > DateTime.MinValue)
|
||||
{
|
||||
data = data.Where(t => t.LogTime > StartTime);
|
||||
}
|
||||
if (EndTime > DateTime.MinValue)
|
||||
{
|
||||
data = data.Where(t => t.LogTime < EndTime.AddDays(1));
|
||||
}
|
||||
var ret = new QueryData<Exceptions>();
|
||||
ret.total = data.Count();
|
||||
switch (Sort)
|
||||
{
|
||||
case "ErrorPage":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ErrorPage) : data.OrderByDescending(t => t.ErrorPage);
|
||||
break;
|
||||
case "UserID":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.UserId) : data.OrderByDescending(t => t.UserId);
|
||||
break;
|
||||
case "UserIp":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.UserIp) : data.OrderByDescending(t => t.UserIp);
|
||||
break;
|
||||
case "LogTime":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.LogTime) : data.OrderByDescending(t => t.LogTime);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,40 +1,40 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
public class QueryGroupOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public QueryData<Group> RetrieveData()
|
||||
{
|
||||
// int limit, int offset, string name, string price, string sort, string order
|
||||
var data = GroupHelper.RetrieveGroups();
|
||||
if (!string.IsNullOrEmpty(GroupName))
|
||||
{
|
||||
data = data.Where(t => t.GroupName.Contains(GroupName));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Description))
|
||||
{
|
||||
data = data.Where(t => t.Description.Contains(Description));
|
||||
}
|
||||
var ret = new QueryData<Group>();
|
||||
ret.total = data.Count();
|
||||
data = Order == "asc" ? data.OrderBy(t => t.GroupName) : data.OrderByDescending(t => t.GroupName);
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Query
|
||||
{
|
||||
public class QueryGroupOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public QueryData<Group> RetrieveData()
|
||||
{
|
||||
// int limit, int offset, string name, string price, string sort, string order
|
||||
var data = GroupHelper.RetrieveGroups();
|
||||
if (!string.IsNullOrEmpty(GroupName))
|
||||
{
|
||||
data = data.Where(t => t.GroupName.Contains(GroupName));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Description))
|
||||
{
|
||||
data = data.Where(t => t.Description.Contains(Description));
|
||||
}
|
||||
var ret = new QueryData<Group>();
|
||||
ret.total = data.Count();
|
||||
data = Order == "asc" ? data.OrderBy(t => t.GroupName) : data.OrderByDescending(t => t.GroupName);
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,70 +1,70 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
public class QueryLogOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string OperateType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime OperateTimeStart { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime OperateTimeEnd { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public QueryData<Log> RetrieveData()
|
||||
{
|
||||
var data = LogHelper.RetrieveLogs();
|
||||
if (!string.IsNullOrEmpty(OperateType))
|
||||
{
|
||||
data = data.Where(t => t.CRUD.ToString().Contains(OperateType));
|
||||
}
|
||||
|
||||
if (OperateTimeStart > DateTime.MinValue)
|
||||
{
|
||||
data = data.Where(t => t.LogTime > OperateTimeStart);
|
||||
}
|
||||
if (OperateTimeEnd > DateTime.MinValue)
|
||||
{
|
||||
data = data.Where(t => t.LogTime < OperateTimeEnd.AddDays(1));
|
||||
}
|
||||
|
||||
var ret = new QueryData<Log>();
|
||||
ret.total = data.Count();
|
||||
switch (Sort)
|
||||
{
|
||||
case "CRUD":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.CRUD) : data.OrderByDescending(t => t.CRUD);
|
||||
break;
|
||||
case "UserName":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.UserName) : data.OrderByDescending(t => t.UserName);
|
||||
break;
|
||||
case "LogTime":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.LogTime) : data.OrderByDescending(t => t.LogTime);
|
||||
break;
|
||||
case "ClientIp":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ClientIp) : data.OrderByDescending(t => t.ClientIp);
|
||||
break;
|
||||
case "RequestUrl":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.RequestUrl) : data.OrderByDescending(t => t.RequestUrl);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Query
|
||||
{
|
||||
public class QueryLogOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string OperateType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime OperateTimeStart { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime OperateTimeEnd { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public QueryData<Log> RetrieveData()
|
||||
{
|
||||
var data = LogHelper.RetrieveLogs();
|
||||
if (!string.IsNullOrEmpty(OperateType))
|
||||
{
|
||||
data = data.Where(t => t.CRUD.ToString().Contains(OperateType));
|
||||
}
|
||||
|
||||
if (OperateTimeStart > DateTime.MinValue)
|
||||
{
|
||||
data = data.Where(t => t.LogTime > OperateTimeStart);
|
||||
}
|
||||
if (OperateTimeEnd > DateTime.MinValue)
|
||||
{
|
||||
data = data.Where(t => t.LogTime < OperateTimeEnd.AddDays(1));
|
||||
}
|
||||
|
||||
var ret = new QueryData<Log>();
|
||||
ret.total = data.Count();
|
||||
switch (Sort)
|
||||
{
|
||||
case "CRUD":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.CRUD) : data.OrderByDescending(t => t.CRUD);
|
||||
break;
|
||||
case "UserName":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.UserName) : data.OrderByDescending(t => t.UserName);
|
||||
break;
|
||||
case "LogTime":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.LogTime) : data.OrderByDescending(t => t.LogTime);
|
||||
break;
|
||||
case "ClientIp":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ClientIp) : data.OrderByDescending(t => t.ClientIp);
|
||||
break;
|
||||
case "RequestUrl":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.RequestUrl) : data.OrderByDescending(t => t.RequestUrl);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,77 +1,77 @@
|
|||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
public class QueryMenuOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ParentName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Category { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string IsResource { get; set; }
|
||||
|
||||
public QueryData<BootstrapMenu> RetrieveData(string userName)
|
||||
{
|
||||
var data = BootstrapMenu.RetrieveMenusByUserName(userName);
|
||||
if (!string.IsNullOrEmpty(ParentName))
|
||||
{
|
||||
data = data.Where(t => t.ParentName.Contains(ParentName));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Name))
|
||||
{
|
||||
data = data.Where(t => t.Name.Contains(Name));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Category))
|
||||
{
|
||||
data = data.Where(t => t.Category.Contains(Category));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(IsResource))
|
||||
{
|
||||
data = data.Where(t => t.IsResource.ToString() == IsResource);
|
||||
}
|
||||
var ret = new QueryData<BootstrapMenu>();
|
||||
ret.total = data.Count();
|
||||
switch (Sort)
|
||||
{
|
||||
case "Name":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Name) : data.OrderByDescending(t => t.Name);
|
||||
break;
|
||||
case "ParentName":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ParentName) : data.OrderByDescending(t => t.ParentName);
|
||||
break;
|
||||
case "Order":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Order) : data.OrderByDescending(t => t.Order);
|
||||
break;
|
||||
case "CategoryName":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.CategoryName) : data.OrderByDescending(t => t.CategoryName);
|
||||
break;
|
||||
case "Target":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Target) : data.OrderByDescending(t => t.Target);
|
||||
break;
|
||||
case "IsResource":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.IsResource) : data.OrderByDescending(t => t.IsResource);
|
||||
break;
|
||||
case "ApplicationCode":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ApplicationCode) : data.OrderByDescending(t => t.ApplicationCode);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
using Bootstrap.Security;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Query
|
||||
{
|
||||
public class QueryMenuOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ParentName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Category { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string IsResource { get; set; }
|
||||
|
||||
public QueryData<BootstrapMenu> RetrieveData(string userName)
|
||||
{
|
||||
var data = BootstrapMenu.RetrieveMenusByUserName(userName);
|
||||
if (!string.IsNullOrEmpty(ParentName))
|
||||
{
|
||||
data = data.Where(t => t.ParentName.Contains(ParentName));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Name))
|
||||
{
|
||||
data = data.Where(t => t.Name.Contains(Name));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Category))
|
||||
{
|
||||
data = data.Where(t => t.Category.Contains(Category));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(IsResource))
|
||||
{
|
||||
data = data.Where(t => t.IsResource.ToString() == IsResource);
|
||||
}
|
||||
var ret = new QueryData<BootstrapMenu>();
|
||||
ret.total = data.Count();
|
||||
switch (Sort)
|
||||
{
|
||||
case "Name":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Name) : data.OrderByDescending(t => t.Name);
|
||||
break;
|
||||
case "ParentName":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ParentName) : data.OrderByDescending(t => t.ParentName);
|
||||
break;
|
||||
case "Order":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Order) : data.OrderByDescending(t => t.Order);
|
||||
break;
|
||||
case "CategoryName":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.CategoryName) : data.OrderByDescending(t => t.CategoryName);
|
||||
break;
|
||||
case "Target":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.Target) : data.OrderByDescending(t => t.Target);
|
||||
break;
|
||||
case "IsResource":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.IsResource) : data.OrderByDescending(t => t.IsResource);
|
||||
break;
|
||||
case "ApplicationCode":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ApplicationCode) : data.OrderByDescending(t => t.ApplicationCode);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,40 +1,40 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
public class QueryRoleOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string RoleName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public QueryData<Role> RetrieveData()
|
||||
{
|
||||
// int limit, int offset, string name, string price, string sort, string order
|
||||
var data = RoleHelper.RetrieveRoles();
|
||||
if (!string.IsNullOrEmpty(RoleName))
|
||||
{
|
||||
data = data.Where(t => t.RoleName.Contains(RoleName));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Description))
|
||||
{
|
||||
data = data.Where(t => t.Description.Contains(Description));
|
||||
}
|
||||
var ret = new QueryData<Role>();
|
||||
ret.total = data.Count();
|
||||
data = Order == "asc" ? data.OrderBy(t => t.RoleName) : data.OrderByDescending(t => t.RoleName);
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Query
|
||||
{
|
||||
public class QueryRoleOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string RoleName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public QueryData<Role> RetrieveData()
|
||||
{
|
||||
// int limit, int offset, string name, string price, string sort, string order
|
||||
var data = RoleHelper.RetrieveRoles();
|
||||
if (!string.IsNullOrEmpty(RoleName))
|
||||
{
|
||||
data = data.Where(t => t.RoleName.Contains(RoleName));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Description))
|
||||
{
|
||||
data = data.Where(t => t.Description.Contains(Description));
|
||||
}
|
||||
var ret = new QueryData<Role>();
|
||||
ret.total = data.Count();
|
||||
data = Order == "asc" ? data.OrderBy(t => t.RoleName) : data.OrderByDescending(t => t.RoleName);
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,59 +1,59 @@
|
|||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Models
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class QueryUserOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
public QueryData<User> RetrieveData()
|
||||
{
|
||||
// int limit, int offset, string name, string price, string sort, string order
|
||||
var data = UserHelper.RetrieveUsers();
|
||||
if (!string.IsNullOrEmpty(Name))
|
||||
{
|
||||
data = data.Where(t => t.UserName.Contains(Name));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(DisplayName))
|
||||
{
|
||||
data = data.Where(t => t.DisplayName.Contains(DisplayName));
|
||||
}
|
||||
var ret = new QueryData<User>();
|
||||
ret.total = data.Count();
|
||||
switch (Sort)
|
||||
{
|
||||
case "UserName":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.UserName) : data.OrderByDescending(t => t.UserName);
|
||||
break;
|
||||
case "DisplayName":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.DisplayName) : data.OrderByDescending(t => t.DisplayName);
|
||||
break;
|
||||
case "RegisterTime":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.RegisterTime) : data.OrderByDescending(t => t.RegisterTime);
|
||||
break;
|
||||
case "ApprovedTime":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ApprovedTime) : data.OrderByDescending(t => t.ApprovedTime);
|
||||
break;
|
||||
case "ApprovedBy":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ApprovedBy) : data.OrderByDescending(t => t.ApprovedBy);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
using Bootstrap.DataAccess;
|
||||
using Longbow.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bootstrap.Admin.Query
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class QueryUserOption : PaginationOption
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
public QueryData<User> RetrieveData()
|
||||
{
|
||||
// int limit, int offset, string name, string price, string sort, string order
|
||||
var data = UserHelper.RetrieveUsers();
|
||||
if (!string.IsNullOrEmpty(Name))
|
||||
{
|
||||
data = data.Where(t => t.UserName.Contains(Name));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(DisplayName))
|
||||
{
|
||||
data = data.Where(t => t.DisplayName.Contains(DisplayName));
|
||||
}
|
||||
var ret = new QueryData<User>();
|
||||
ret.total = data.Count();
|
||||
switch (Sort)
|
||||
{
|
||||
case "UserName":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.UserName) : data.OrderByDescending(t => t.UserName);
|
||||
break;
|
||||
case "DisplayName":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.DisplayName) : data.OrderByDescending(t => t.DisplayName);
|
||||
break;
|
||||
case "RegisterTime":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.RegisterTime) : data.OrderByDescending(t => t.RegisterTime);
|
||||
break;
|
||||
case "ApprovedTime":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ApprovedTime) : data.OrderByDescending(t => t.ApprovedTime);
|
||||
break;
|
||||
case "ApprovedBy":
|
||||
data = Order == "asc" ? data.OrderBy(t => t.ApprovedBy) : data.OrderByDescending(t => t.ApprovedBy);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ret.rows = data.Skip(Offset).Take(Limit);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
using Bootstrap.Security.Filter;
|
||||
using Bootstrap.Security.Middleware;
|
||||
using Longbow.Cache;
|
||||
using Longbow.Cache.Middleware;
|
||||
using Longbow.Configuration;
|
||||
using Longbow.Data;
|
||||
using Longbow.Logging;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Bootstrap.Admin
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddLogging(builder => builder.AddFileLogger());
|
||||
services.AddConfigurationManager();
|
||||
services.AddCacheManager();
|
||||
services.AddDBAccessFactory();
|
||||
services.AddDataProtection(op => op.ApplicationDiscriminator = "BootstrapAdmin")
|
||||
.SetApplicationName("__bd__")
|
||||
.DisableAutomaticKeyGeneration()
|
||||
.PersistKeysToFileSystem(new DirectoryInfo(ConfigurationManager.AppSettings["KeyPath"]));
|
||||
services.AddMvc(options =>
|
||||
{
|
||||
options.Filters.Add<BootstrapAdminAuthorizeFilter>();
|
||||
options.Filters.Add<BootstrapAdminExceptionFilter>();
|
||||
}).AddJsonOptions(options =>
|
||||
{
|
||||
options.SerializerSettings.ContractResolver = new DefaultContractResolver();
|
||||
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
|
||||
});
|
||||
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseBrowserLink();
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
}
|
||||
app.UseStaticFiles();
|
||||
app.UseAuthentication();
|
||||
app.UseCacheManagerCorsHandler();
|
||||
app.UseBootstrapRoleAuthorization();
|
||||
app.UseMvc(routes =>
|
||||
{
|
||||
routes.MapRoute(
|
||||
name: "default",
|
||||
template: "{controller=Home}/{action=Index}/{id?}");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
@{
|
||||
ViewBag.Title = "未授权请求";
|
||||
Layout = "~/Views/Shared/_Root.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/css/error.css" rel="stylesheet" />
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/js/error.js"></script>
|
||||
}
|
||||
<section class="error-wrapper">
|
||||
<img src="~/images/error_icon.png" />
|
||||
<h1>网页拒绝访问</h1>
|
||||
<h3>您无权访问本页面请联系网站管理员授权后再查看</h3>
|
||||
<br />
|
||||
<a href="~/Home/Index" target="_top">返回首页</a>
|
||||
</section>
|
|
@ -0,0 +1,21 @@
|
|||
@model Bootstrap.Admin.Models.ModelBase
|
||||
@{
|
||||
ViewBag.Title = Model.Title;
|
||||
Layout = "~/Views/Shared/_Root.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="~/css/login.css" rel="stylesheet" />
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/js/bootstrap.js"></script>
|
||||
<script src="~/js/Longbow.Common.js"></script>
|
||||
<script src="~/js/jquery.validate.js"></script>
|
||||
<script src="~/js/messages_zh.js"></script>
|
||||
<script src="~/js/Login.js"></script>
|
||||
}
|
||||
<div class="container">
|
||||
<form id="login" method="post">
|
||||
@Html.Partial("SignIn")
|
||||
</form>
|
||||
</div>
|
|
@ -0,0 +1,22 @@
|
|||
@model Bootstrap.Admin.Models.ModelBase
|
||||
@{
|
||||
ViewBag.Title = Model.Title;
|
||||
Layout = "~/Views/Shared/_Root.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="~/css/loginm.css" rel="stylesheet" />
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/js/bootstrap.js"></script>
|
||||
<script src="~/js/Longbow.Common.js"></script>
|
||||
<script src="~/js/jquery.validate.js"></script>
|
||||
<script src="~/js/messages_zh.js"></script>
|
||||
<script src="~/js/Login.js"></script>
|
||||
}
|
||||
<div class="container">
|
||||
<form id="login" class="form-signin" method="post">
|
||||
@Html.Partial("SignIn")
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
@{
|
||||
ViewBag.Title = "客户端测试";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<style type="text/css">
|
||||
label {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
section {
|
||||
padding-top: 15px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
<section class="container-fluid">
|
||||
@Html.Partial("_Mobile")
|
||||
@{
|
||||
ViewBag.Title = "客户端测试";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<style type="text/css">
|
||||
label {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
section {
|
||||
padding-top: 15px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
<section class="container-fluid">
|
||||
@Html.Partial("_Mobile")
|
||||
</section>
|
|
@ -1,107 +1,107 @@
|
|||
@{
|
||||
ViewBag.Title = "注册新用户";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/register.css" rel="stylesheet" />
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/Scripts/jquery.validate.js"></script>
|
||||
<script src="~/Scripts/messages_zh.js"></script>
|
||||
<script src="~/Scripts/sweetalert.js"></script>
|
||||
<script src="~/Scripts/register.js"></script>
|
||||
}
|
||||
<div class="container">
|
||||
<div class="setup-wrapper">
|
||||
<header><h2>新用户注册</h2></header>
|
||||
<div class="setup-header">
|
||||
<ol class="steps">
|
||||
<li class="current">
|
||||
<strong class="step">步骤 1:</strong><span>创建一个账号</span>
|
||||
</li>
|
||||
<li>
|
||||
<strong class="step">步骤 2:</strong><span>确认信息</span>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<form autocomplete="off" id="signup-form" method="post">
|
||||
<div class="setup-main">
|
||||
<div class="setup-form-container">
|
||||
<h3 class="setup-form-title mb-3">
|
||||
创建您的账号
|
||||
</h3>
|
||||
<div class="form-group">
|
||||
<label for="userName">登陆账号:</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">@@</span>
|
||||
<input type="text" id="userName" name="userName" class="form-control" placeholder="登陆账号" value="" autofocus maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="displayName">显示名称:</label>
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-user input-group-addon"></span>
|
||||
<input type="text" id="displayName" name="displayName" class="form-control" value="" placeholder="显示名称" maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">密码:</label>
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-lock input-group-addon"></span>
|
||||
<input type="password" id="password" name="password" class="form-control" value="" placeholder="密码" maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="assurePassword">确认密码:</label>
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-lock input-group-addon"></span>
|
||||
<input type="password" id="assurePassword" name="assurePassword" class="form-control" value="" placeholder="确认密码" maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description">申请理由:</label>
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-certificate input-group-addon"></span>
|
||||
<textarea id="description" name="description" class="form-control" placeholder="申请理由,500字以内" rows="6" maxlength="500"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button id="btnAccount" class="btn btn-primary pull-right" type="button">继续</button>
|
||||
</div> <!-- /.setup-form-container -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="setup-confirm">
|
||||
<h3>您注册的信息如下:</h3>
|
||||
<div class="form-group">
|
||||
<label>登陆账号:</label><span id="loginID" class="form-control-static"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>显示名称:</label><span id="loginName" class="form-control-static"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>申请理由:</label><span id="loginDesc" class="form-control-static"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button id="btnPrev" class="btn btn-default" type="button">上一步</button>
|
||||
<button id="btnSubmit" class="btn btn-primary pull-right" type="submit">确认并提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="setup-secondary">
|
||||
<div class="setup-info-module">
|
||||
<h4>欢迎加入本系统</h4>
|
||||
<ul class="features-list">
|
||||
<li><strong>Unlimited</strong> 特性一</li>
|
||||
<li><strong>Unlimited</strong> 特性二</li>
|
||||
<li><strong>Unlimited</strong> 特性三</li>
|
||||
<li><strong>Unlimited</strong> 特性四</li>
|
||||
<li class="list-divider"></li>
|
||||
<li><i class="glyphicon glyphicon-ok"></i> 优点一</li>
|
||||
<li><i class="glyphicon glyphicon-ok"></i> 优点二</li>
|
||||
<li><i class="glyphicon glyphicon-ok"></i> 优点三</li>
|
||||
<li><i class="glyphicon glyphicon-ok"></i> 优点四</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@{
|
||||
ViewBag.Title = "注册新用户";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/css/register.css" rel="stylesheet" />
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/js/jquery.validate.js"></script>
|
||||
<script src="~/js/messages_zh.js"></script>
|
||||
<script src="~/js/sweetalert.js"></script>
|
||||
<script src="~/js/register.js"></script>
|
||||
}
|
||||
<div class="container">
|
||||
<div class="setup-wrapper">
|
||||
<header><h2>新用户注册</h2></header>
|
||||
<div class="setup-header">
|
||||
<ol class="steps">
|
||||
<li class="current">
|
||||
<strong class="step">步骤 1:</strong><span>创建一个账号</span>
|
||||
</li>
|
||||
<li>
|
||||
<strong class="step">步骤 2:</strong><span>确认信息</span>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<form autocomplete="off" id="signup-form" method="post">
|
||||
<div class="setup-main">
|
||||
<div class="setup-form-container">
|
||||
<h3 class="setup-form-title mb-3">
|
||||
创建您的账号
|
||||
</h3>
|
||||
<div class="form-group">
|
||||
<label for="userName">登陆账号:</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">@@</span>
|
||||
<input type="text" id="userName" name="userName" class="form-control" placeholder="登陆账号" value="" autofocus maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="displayName">显示名称:</label>
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-user input-group-addon"></span>
|
||||
<input type="text" id="displayName" name="displayName" class="form-control" value="" placeholder="显示名称" maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">密码:</label>
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-lock input-group-addon"></span>
|
||||
<input type="password" id="password" name="password" class="form-control" value="" placeholder="密码" maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="assurePassword">确认密码:</label>
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-lock input-group-addon"></span>
|
||||
<input type="password" id="assurePassword" name="assurePassword" class="form-control" value="" placeholder="确认密码" maxlength="50" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description">申请理由:</label>
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-certificate input-group-addon"></span>
|
||||
<textarea id="description" name="description" class="form-control" placeholder="申请理由,500字以内" rows="6" maxlength="500"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button id="btnAccount" class="btn btn-primary pull-right" type="button">继续</button>
|
||||
</div> <!-- /.setup-form-container -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="setup-confirm">
|
||||
<h3>您注册的信息如下:</h3>
|
||||
<div class="form-group">
|
||||
<label>登陆账号:</label><span id="loginID" class="form-control-static"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>显示名称:</label><span id="loginName" class="form-control-static"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>申请理由:</label><span id="loginDesc" class="form-control-static"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button id="btnPrev" class="btn btn-default" type="button">上一步</button>
|
||||
<button id="btnSubmit" class="btn btn-primary pull-right" type="submit">确认并提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="setup-secondary">
|
||||
<div class="setup-info-module">
|
||||
<h4>欢迎加入本系统</h4>
|
||||
<ul class="features-list">
|
||||
<li><strong>Unlimited</strong> 特性一</li>
|
||||
<li><strong>Unlimited</strong> 特性二</li>
|
||||
<li><strong>Unlimited</strong> 特性三</li>
|
||||
<li><strong>Unlimited</strong> 特性四</li>
|
||||
<li class="list-divider"></li>
|
||||
<li><i class="glyphicon glyphicon-ok"></i> 优点一</li>
|
||||
<li><i class="glyphicon glyphicon-ok"></i> 优点二</li>
|
||||
<li><i class="glyphicon glyphicon-ok"></i> 优点三</li>
|
||||
<li><i class="glyphicon glyphicon-ok"></i> 优点四</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,24 @@
|
|||
@model Bootstrap.Admin.Models.ModelBase
|
||||
<h2 class="form-signin-heading">@Model.Title</h2>
|
||||
<div class="login-wrap">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-user input-group-addon"></span>
|
||||
<input type="text" name="userName" class="form-control" placeholder="用户名" value="" autofocus />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-lock input-group-addon"></span>
|
||||
<input type="password" name="password" class="form-control" value="" placeholder="密码" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<input id="remember" name="remember" type="checkbox" value="true" /><label for="remember">记住我</label>
|
||||
</div>
|
||||
<button class="btn btn-lg btn-login btn-block" type="submit">登 陆</button>
|
||||
<div class="login-footer">
|
||||
<div class="login-create"><a href="Register">申请账号</a></div>
|
||||
<div class="login-reset"><a href="#">忘记密码</a></div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,13 +1,13 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "Api 文档";
|
||||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/Scripts/apidoc.js"></script>
|
||||
<script src="~/js/apidoc.js"></script>
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/api.css" rel="stylesheet" />
|
||||
<link href="~/css/api.css" rel="stylesheet" />
|
||||
}
|
||||
<section>
|
||||
<div><h3>接口返回值定义</h3></div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "字典表维护";
|
||||
Layout = "~/Views/Shared/_Default.cshtml";
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/Scripts/bootstrap3-typeahead.js"></script>
|
||||
<script src="~/scripts/Dicts.js"></script>
|
||||
<script src="~/js/bootstrap3-typeahead.js"></script>
|
||||
<script src="~/js/Dicts.js"></script>
|
||||
}
|
||||
@section query {
|
||||
<form class="form-inline" role="form">
|
||||
|
@ -54,7 +54,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="dataForm" name="dataForm" role="form">
|
||||
<input type="text" class="form-control hidden" id="dictID" name="dictID" />
|
||||
<input type="text" class="form-control hidden" id="dictID" name="dictID" data-default-val="0" />
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="dictCate">字典标签</label>
|
||||
<div class="col-sm-10">
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "程序异常";
|
||||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/bootstrap-table.css" rel="stylesheet" />
|
||||
<link href="~/Content/bootstrap-datetimepicker.css" rel="stylesheet" />
|
||||
<link href="~/Content/fa.css" rel="stylesheet" />
|
||||
<link href="~/css/bootstrap-table.css" rel="stylesheet" />
|
||||
<link href="~/css/bootstrap-datetimepicker.css" rel="stylesheet" />
|
||||
<link href="~/css/fa.css" rel="stylesheet" />
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/Scripts/bootstrap-table.js"></script>
|
||||
<script src="~/Scripts/bootstrap-table-zh-CN.js"></script>
|
||||
<script src="~/Scripts/longbow.dataentity.js"></script>
|
||||
<script src="~/Scripts/bootstrap-datetimepicker.js"></script>
|
||||
<script src="~/Scripts/bootstrap-datetimepicker.zh-CN.js"></script>
|
||||
<script src="~/scripts/Exceptions.js"></script>
|
||||
<script src="~/js/bootstrap-table.js"></script>
|
||||
<script src="~/js/bootstrap-table-zh-CN.js"></script>
|
||||
<script src="~/js/longbow.dataentity.js"></script>
|
||||
<script src="~/js/bootstrap-datetimepicker.js"></script>
|
||||
<script src="~/js/bootstrap-datetimepicker.zh-CN.js"></script>
|
||||
<script src="~/js/Exceptions.js"></script>
|
||||
}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">查询条件</div>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "图标集";
|
||||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/fa.css" rel="stylesheet" />
|
||||
<link href="~/css/fa.css" rel="stylesheet" />
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/Scripts/icon.js"></script>
|
||||
<script src="~/js/icon.js"></script>
|
||||
}
|
||||
@Html.Partial("IconView")
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "部门管理";
|
||||
Layout = "~/Views/Shared/_Default.cshtml";
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/scripts/Groups.js"></script>
|
||||
<script src="~/js/Groups.js"></script>
|
||||
}
|
||||
@section query {
|
||||
<form class="form-inline" role="form">
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "系统日志";
|
||||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/bootstrap-table.css" rel="stylesheet" />
|
||||
<link href="~/Content/bootstrap-datetimepicker.css" rel="stylesheet" />
|
||||
<link href="~/css/bootstrap-table.css" rel="stylesheet" />
|
||||
<link href="~/css/bootstrap-datetimepicker.css" rel="stylesheet" />
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/Scripts/bootstrap-table.js"></script>
|
||||
<script src="~/Scripts/bootstrap-table-zh-CN.js"></script>
|
||||
<script src="~/Scripts/longbow.dataentity.js"></script>
|
||||
<script src="~/Scripts/bootstrap-datetimepicker.js"></script>
|
||||
<script src="~/Scripts/bootstrap-datetimepicker.zh-CN.js"></script>
|
||||
<script src="~/scripts/Logs.js"></script>
|
||||
<script src="~/js/bootstrap-table.js"></script>
|
||||
<script src="~/js/bootstrap-table-zh-CN.js"></script>
|
||||
<script src="~/js/longbow.dataentity.js"></script>
|
||||
<script src="~/js/bootstrap-datetimepicker.js"></script>
|
||||
<script src="~/js/bootstrap-datetimepicker.zh-CN.js"></script>
|
||||
<script src="~/js/Logs.js"></script>
|
||||
}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">查询条件</div>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "菜单管理";
|
||||
Layout = "~/Views/Shared/_Default.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/fa.css" rel="stylesheet" />
|
||||
<link href="~/Content/jquery.nestable.css" rel="stylesheet" />
|
||||
<link href="~/css/fa.css" rel="stylesheet" />
|
||||
<link href="~/css/jquery.nestable.css" rel="stylesheet" />
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/Scripts/jquery.nestable.js"></script>
|
||||
<script src="~/scripts/Menus.js"></script>
|
||||
<script src="~/js/jquery.nestable.js"></script>
|
||||
<script src="~/js/Menus.js"></script>
|
||||
}
|
||||
@section query {
|
||||
<form class="form-inline" role="form">
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "站内消息";
|
||||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/Scripts/message.js"></script>
|
||||
<script src="~/js/message.js"></script>
|
||||
}
|
||||
<div class="mail-box">
|
||||
<div class="sm-side">
|
||||
<div class="user-head">
|
||||
<a href="javascript:;" class="inbox-avatar">
|
||||
<img src="../content/images/logo6.jpg" alt="">
|
||||
<img src="../images/logo6.jpg" alt="">
|
||||
</a>
|
||||
<div class="user-name"><h5><a href="#">@Model.DisplayName</a></h5></div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.ModelBase
|
||||
NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "客户端测试";
|
||||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "通知管理";
|
||||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/Scripts/noti.js"></script>
|
||||
<script src="~/js/noti.js"></script>
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/tasks.css" rel="stylesheet" />
|
||||
<link href="~/css/tasks.css" rel="stylesheet" />
|
||||
}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">用户注册<span class="pull-right"><a id="refreshUsers" href="javascript:;" class="fa fa-refresh" title="点击刷新" role="tooltip" data-placement="left"></a></span></div>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
@model ProfilesModel
|
||||
@model Bootstrap.Admin.Models.ProfilesModel
|
||||
@{
|
||||
ViewBag.Title = "个人中心";
|
||||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/Scripts/longbow.dataentity.js"></script>
|
||||
<script src="~/Scripts/fileinput.js"></script>
|
||||
<script src="~/Scripts/fileinput.zh.js"></script>
|
||||
<script src="~/Scripts/jquery.validate.js"></script>
|
||||
<script src="~/Scripts/messages_zh.js"></script>
|
||||
<script src="~/scripts/Profiles.js"></script>
|
||||
<script src="~/js/longbow.dataentity.js"></script>
|
||||
<script src="~/js/fileinput.js"></script>
|
||||
<script src="~/js/fileinput.zh.js"></script>
|
||||
<script src="~/js/jquery.validate.js"></script>
|
||||
<script src="~/js/messages_zh.js"></script>
|
||||
<script src="~/js/Profiles.js"></script>
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/tasks.css" rel="stylesheet" />
|
||||
<link href="~/Content/fileinput.css" rel="stylesheet" />
|
||||
<link href="~/css/tasks.css" rel="stylesheet" />
|
||||
<link href="~/css/fileinput.css" rel="stylesheet" />
|
||||
}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">基本资料</div>
|
||||
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
</form>
|
||||
<div class="modal-footer">
|
||||
<button id="btnSaveDisplayName" class="btn btn-default" type="button" disabled data-admin="@LgbPrincipal.IsWebAdmin(User.Identity.Name)"><i class="fa fa-save"></i><span>保存</span></button>
|
||||
<button id="btnSaveDisplayName" class="btn btn-default" type="button" disabled data-admin="@User.IsInRole("Administrators")"><i class="fa fa-save"></i><span>保存</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -57,14 +57,14 @@
|
|||
</div>
|
||||
</form>
|
||||
<div class="modal-footer">
|
||||
<button id="btnSavePassword" class="btn btn-default" type="button" disabled data-admin="@LgbPrincipal.IsWebAdmin(User.Identity.Name)"><i class="fa fa-save"></i><span>保存</span></button>
|
||||
<button id="btnSavePassword" class="btn btn-default" type="button" disabled data-admin="@User.IsInRole("Administrators")"><i class="fa fa-save"></i><span>保存</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">网站皮肤</div>
|
||||
<div class="panel-body">
|
||||
<form id="infoDataForm" name="cssDataForm" class="form-inline" role="form">
|
||||
<form id="cssDataForm" name="cssDataForm" class="form-inline" role="form">
|
||||
<div class="row">
|
||||
<div class="form-group col-xs-12">
|
||||
<label class="control-label" for="userName">样式</label>
|
||||
|
@ -86,7 +86,7 @@
|
|||
</div>
|
||||
</form>
|
||||
<div class="modal-footer">
|
||||
<button id="btnSaveCss" class="btn btn-default" type="button" disabled data-admin="@LgbPrincipal.IsWebAdmin(User.Identity.Name)"><i class="fa fa-save"></i><span>保存</span></button>
|
||||
<button id="btnSaveCss" class="btn btn-default" type="button" disabled data-admin="@User.IsInRole("Administrators")"><i class="fa fa-save"></i><span>保存</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "角色管理";
|
||||
Layout = "~/Views/Shared/_Default.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/fa.css" rel="stylesheet" />
|
||||
<link href="~/Content/jquery.nestable.css" rel="stylesheet" />
|
||||
<link href="~/css/fa.css" rel="stylesheet" />
|
||||
<link href="~/css/jquery.nestable.css" rel="stylesheet" />
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/Scripts/jquery.nestable.js"></script>
|
||||
<script src="~/scripts/Roles.js"></script>
|
||||
<script src="~/js/jquery.nestable.js"></script>
|
||||
<script src="~/js/Roles.js"></script>
|
||||
|
||||
}
|
||||
@section query {
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "网站设置";
|
||||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/Scripts/longbow.dataentity.js"></script>
|
||||
<script src="~/Scripts/jquery.validate.js"></script>
|
||||
<script src="~/Scripts/messages_zh.js"></script>
|
||||
<script src="~/Scripts/Settings.js"></script>
|
||||
<script src="~/js/longbow.dataentity.js"></script>
|
||||
<script src="~/js/jquery.validate.js"></script>
|
||||
<script src="~/js/messages_zh.js"></script>
|
||||
<script src="~/js/Settings.js"></script>
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/tasks.css" rel="stylesheet" />
|
||||
<link href="~/css/tasks.css" rel="stylesheet" />
|
||||
}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">系统名称设置</div>
|
||||
|
@ -61,7 +61,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">网站缓存<a id="clearCache" href="#" class="clearcache fa fa-times-circle-o" data-admin="@LgbPrincipal.IsAdmin(User)" title="全部清除(WebAdmin可用)" role="tooltip" data-placement="left"></a><a id="refreshCache" href="#" class="pull-right fa fa-refresh" title="点击刷新" role="tooltip"></a></div>
|
||||
<div class="panel-heading">网站缓存<a id="clearCache" href="#" class="clearcache fa fa-times-circle-o" data-admin="@User.IsInRole("Administrators")" title="全部清除(WebAdmin可用)" role="tooltip" data-placement="left"></a><a id="refreshCache" href="#" class="pull-right fa fa-refresh" title="点击刷新" role="tooltip"></a></div>
|
||||
<div class="panel-body">
|
||||
<div class="tasks-widget">
|
||||
<ul id="sortable" class="task-list ui-sortable"></ul>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "任务管理";
|
||||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/Scripts/tasks.js"></script>
|
||||
<script src="~/js/tasks.js"></script>
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/tasks.css" rel="stylesheet" />
|
||||
<link href="~/css/tasks.css" rel="stylesheet" />
|
||||
}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">任务消息<span class="pull-right"><a id="refreshTask" href="javascript:;" class="fa fa-refresh"></a></span></div>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
@{
|
||||
ViewBag.Title = "用户管理";
|
||||
Layout = "~/Views/Shared/_Default.cshtml";
|
||||
}
|
||||
@section Javascript {
|
||||
<script src="~/scripts/Users.js"></script>
|
||||
<script src="~/js/Users.js"></script>
|
||||
}
|
||||
@section query {
|
||||
<form class="form-inline" role="form">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@model HeaderBarModel
|
||||
@model Bootstrap.Admin.Models.HeaderBarModel
|
||||
@{
|
||||
ViewBag.Title = "首页";
|
||||
Layout = "~/Views/Shared/_Normal.cshtml";
|
||||
|
@ -11,7 +11,7 @@
|
|||
</style>
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/Scripts/Content.js"></script>
|
||||
<script src="~/js/Content.js"></script>
|
||||
}
|
||||
<div id="content" class="content-body welcome-bg">
|
||||
</div>
|
|
@ -1,20 +1,20 @@
|
|||
@model LockModel
|
||||
@model Bootstrap.Admin.Models.LockModel
|
||||
@{
|
||||
ViewBag.Title = "系统登陆";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/lock.css" rel="stylesheet" />
|
||||
<link href="~/css/lock.css" rel="stylesheet" />
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/Scripts/jquery.validate.js"></script>
|
||||
<script src="~/Scripts/messages_zh.js"></script>
|
||||
<script src="~/Scripts/lock.js"></script>
|
||||
<script src="~/js/jquery.validate.js"></script>
|
||||
<script src="~/js/messages_zh.js"></script>
|
||||
<script src="~/js/lock.js"></script>
|
||||
}
|
||||
<div class="lock-wrapper">
|
||||
<div id="time"></div>
|
||||
<div class="lock-box text-center">
|
||||
<img alt="lock avatar" src="~/content/images/logo2.jpg" />
|
||||
<img alt="lock avatar" src="~/images/logo2.jpg" />
|
||||
<h1>@Model.DisplayName</h1>
|
||||
<span class="locked">系统已锁定</span>
|
||||
<form role="form" class="form-inline" method="post" autocomplete="off" action="~/Home/Login?ReturnUrl=@Model.ReturnUrl">
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
@model LoginModel
|
||||
@{
|
||||
ViewBag.Title = Model.Title;
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/login.css" rel="stylesheet" />
|
||||
<link href="~/Content/login-responsive.css" rel="stylesheet" />
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/Scripts/jquery.validate.js"></script>
|
||||
<script src="~/Scripts/messages_zh.js"></script>
|
||||
<script src="~/Scripts/Login.js"></script>
|
||||
}
|
||||
<div class="container">
|
||||
<form id="login" class="form-signin" method="post">
|
||||
<h2 class="form-signin-heading">@Model.Title</h2>
|
||||
<div class="login-wrap">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-user input-group-addon"></span>
|
||||
<input type="text" name="userName" class="form-control" placeholder="用户名" value="@Model.UserName" autofocus />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="glyphicon glyphicon-lock input-group-addon"></span>
|
||||
<input type="password" name="password" class="form-control" value="@Model.Password" placeholder="密码" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<input id="remember" name="remember" type="checkbox" checked value="true" /><label for="remember">记住我</label>
|
||||
</div>
|
||||
<button class="btn btn-lg btn-login btn-block" type="submit">登 陆</button>
|
||||
<div class="login-footer">
|
||||
<div class="login-create"><a href="Register">申请注册</a></div>
|
||||
<div class="login-reset"><a href="#">忘记密码</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
@model HeaderBarModel
|
||||
@model Bootstrap.Admin.Models.HeaderBarModel
|
||||
<footer class="site-footer">
|
||||
<div class="text-center">
|
||||
<span id="websiteFooter">@Model.Footer</span>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@model HeaderBarModel
|
||||
@model Bootstrap.Admin.Models.HeaderBarModel
|
||||
<header class="header">
|
||||
<div class="bg">
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
|||
<i class="fa fa-bars"></i>
|
||||
<span id="websiteTitle">@Model.Title</span>
|
||||
</a>
|
||||
@if (LgbPrincipal.IsAdmin(User))
|
||||
@if (User.IsInRole("Administrators"))
|
||||
{
|
||||
<ul class="notify-row">
|
||||
<!-- tasks start -->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@model NavigatorBarModel
|
||||
@model Bootstrap.Admin.Models.NavigatorBarModel
|
||||
<aside>
|
||||
<div id="sidebar" class="nav-collapse sidebar">
|
||||
<!-- sidebar menu start-->
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
|
||||
.error-wrapper .icon-500 {
|
||||
background: url(content/images/error_icon.png) no-repeat;
|
||||
background: url(/images/error_icon.png) no-repeat;
|
||||
width: 289px;
|
||||
height: 274px;
|
||||
display: inline-block;
|
||||
|
|
|
@ -2,27 +2,27 @@
|
|||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/sweetalert.css" rel="stylesheet" />
|
||||
<link href="~/Content/toastr.css" rel="stylesheet" />
|
||||
<link href="~/Content/admin.css" rel="stylesheet" />
|
||||
<link href="~/Content/admin-responsive.css" rel="stylesheet" />
|
||||
<link href="~/css/sweetalert.css" rel="stylesheet" />
|
||||
<link href="~/css/toastr.css" rel="stylesheet" />
|
||||
<link href="~/css/admin.css" rel="stylesheet" />
|
||||
<link href="~/css/admin-responsive.css" rel="stylesheet" />
|
||||
@RenderSection("css", false)
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/Scripts/sweetalert.js"></script>
|
||||
<script src="~/Scripts/jquery.dcjqaccordion.2.7.js"></script>
|
||||
<script src="~/Scripts/jquery.scrollTo.js"></script>
|
||||
<script src="~/Scripts/jquery.nicescroll.min.js"></script>
|
||||
<script src="~/Scripts/common-scripts.js"></script>
|
||||
<script src="~/Scripts/log.js"></script>
|
||||
<script src="~/Scripts/toastr.min.js"></script>
|
||||
<script src="~/Scripts/framework.js"></script>
|
||||
<script src="~/js/sweetalert.js"></script>
|
||||
<script src="~/js/jquery.dcjqaccordion.2.7.js"></script>
|
||||
<script src="~/js/jquery.scrollTo.js"></script>
|
||||
<script src="~/js/jquery.nicescroll.min.js"></script>
|
||||
<script src="~/js/common-scripts.js"></script>
|
||||
<script src="~/js/log.js"></script>
|
||||
<script src="~/js/toastr.min.js"></script>
|
||||
<script src="~/js/framework.js"></script>
|
||||
@RenderSection("Javascript", false)
|
||||
}
|
||||
@Html.Partial("Header")
|
||||
@Html.Partial("navigator")
|
||||
<section id="main-content" class="main-content">
|
||||
@RenderBody()
|
||||
</section>
|
||||
@Html.Partial("Footer")
|
||||
@RenderSection("modal", false)
|
||||
@section modal {
|
||||
@RenderSection("modal", false)
|
||||
}
|
|
@ -2,15 +2,15 @@
|
|||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/bootstrap-table.css" rel="stylesheet" />
|
||||
<link href="~/css/bootstrap-table.css" rel="stylesheet" />
|
||||
@RenderSection("css", false)
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/Scripts/longbow.dataentity.js"></script>
|
||||
<script src="~/Scripts/bootstrap-table.js"></script>
|
||||
<script src="~/Scripts/bootstrap-table-zh-CN.js"></script>
|
||||
<script src="~/Scripts/jquery.validate.js"></script>
|
||||
<script src="~/Scripts/messages_zh.js"></script>
|
||||
<script src="~/js/longbow.dataentity.js"></script>
|
||||
<script src="~/js/bootstrap-table.js"></script>
|
||||
<script src="~/js/bootstrap-table-zh-CN.js"></script>
|
||||
<script src="~/js/jquery.validate.js"></script>
|
||||
<script src="~/js/messages_zh.js"></script>
|
||||
@RenderSection("Javascript", false)
|
||||
}
|
||||
@section modal {
|
||||
|
|
|
@ -1,37 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>@ViewBag.Title</title>
|
||||
<link rel="shortcut icon" href="~/favicon.ico" />
|
||||
<!-- 新 Bootstrap 核心 CSS 文件 -->
|
||||
<link href="~/Content/bootstrap.css" rel="stylesheet">
|
||||
<link href="~/Content/bootstrap-theme.css" rel="stylesheet">
|
||||
<link href="~/Content/nprogress.css" rel="stylesheet" />
|
||||
<link href="~/Content/font-awesome.css" rel="stylesheet" />
|
||||
<link href="~/Content/site.css" rel="stylesheet" />
|
||||
<link href="~/Content/site-responsive.css" rel="stylesheet" />
|
||||
<!--[if lt IE 9 ]>
|
||||
<link href="../Content/IE8.css" rel="stylesheet" />
|
||||
<![endif]-->
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Root.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="~/css/bootstrap-theme.css" rel="stylesheet">
|
||||
<link href="~/css/nprogress.css" rel="stylesheet" />
|
||||
<link href="~/css/font-awesome.css" rel="stylesheet" />
|
||||
<link href="~/css/site.css" rel="stylesheet" />
|
||||
<link href="~/css/site-responsive.css" rel="stylesheet" />
|
||||
@RenderSection("css", false)
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lt IE 9 ]>
|
||||
<div id="ieAlert" class="alert alert-danger alert-dismissible">
|
||||
<div>你的浏览器版本太低,不能完美的支持本系统,请升级到至少IE9 <a href="../IE/IE9.exe" target="_blank">速速点击下载</a> <a href="https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads" target="_blank">微软官方下载</a> !</div>
|
||||
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
|
||||
</div>
|
||||
<![endif]-->
|
||||
@RenderBody()
|
||||
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
|
||||
<script src="~/Scripts/jquery-3.1.1.js"></script>
|
||||
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
|
||||
<script src="~/Scripts/bootstrap.js"></script>
|
||||
<script src="~/Scripts/nprogress.js"></script>
|
||||
<script src="~/Scripts/Longbow.Common.js"></script>
|
||||
}
|
||||
@section javascript {
|
||||
<script src="~/js/bootstrap.js"></script>
|
||||
<script src="~/js/nprogress.js"></script>
|
||||
<script src="~/js/Longbow.Common.js"></script>
|
||||
@RenderSection("Javascript", false)
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
<a id="pathBase" href="~/" class="hidden"></a>
|
||||
@Html.Partial("Header")
|
||||
@RenderBody()
|
||||
@Html.Partial("Footer")
|
||||
@RenderSection("modal", false)
|
|
@ -2,16 +2,13 @@
|
|||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/bootstrap-table.css" rel="stylesheet" />
|
||||
<link href="~/Content/sweetalert.css" rel="stylesheet" />
|
||||
<link href="~/css/bootstrap-table.css" rel="stylesheet" />
|
||||
<link href="~/css/sweetalert.css" rel="stylesheet" />
|
||||
@RenderSection("css", false)
|
||||
}
|
||||
@section javascript {
|
||||
@RenderSection("Javascript", false)
|
||||
}
|
||||
@Html.Partial("Header")
|
||||
<section id="main-content">
|
||||
@RenderBody()
|
||||
</section>
|
||||
@Html.Partial("Footer")
|
||||
@RenderSection("modal", false)
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>@ViewBag.Title</title>
|
||||
@RenderSection("css", false)
|
||||
<!--[if lt IE 10 ]>
|
||||
<link href="../css/IE8.css" rel="stylesheet" />
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lt IE 10 ]>
|
||||
<div id="ieAlert" class="alert alert-danger alert-dismissible">
|
||||
<div>你的浏览器版本太低,不能完美的支持本系统,请升级到至少IE10 <a href="../IE/IE10.exe" target="_blank">本地下载</a> <a href="https://support.microsoft.com/zh-cn/help/17621/internet-explorer-downloads" target="_blank">微软下载</a>,或者使用Chrome浏览器 <a href="../Software/ChromeSetup.exe" target="_blank">本地下载</a></div>
|
||||
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
|
||||
</div>
|
||||
<![endif]-->
|
||||
@RenderBody()
|
||||
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
|
||||
<script src="~/js/jquery-3.1.1.js"></script>
|
||||
@RenderSection("Javascript", false)
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,2 @@
|
|||
@using Bootstrap.Admin.Models
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@ -1,3 +1,3 @@
|
|||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
Layout = "_Layout";
|
||||
}
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="Longbow.Security.Principal" />
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Linq" />
|
||||
<add namespace="Bootstrap.Admin" />
|
||||
<add namespace="Bootstrap.DataAccess" />
|
||||
<add namespace="Bootstrap.Admin.Models" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
|
||||
<system.web>
|
||||
<compilation>
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
</configuration>
|
|
@ -1,44 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<!--
|
||||
In the example below, the "SetAttributes" transform will change the value of
|
||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||
finds an attribute "name" that has a value of "MyDB".
|
||||
|
||||
<connectionStrings>
|
||||
<add name="MyDB"
|
||||
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
-->
|
||||
<connectionStrings>
|
||||
<add name="SQL"
|
||||
connectionString="Data Source=.;Initial Catalog=BootstrapAdmin;User ID=ba;Password=ba20171231"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
<add name="ba"
|
||||
connectionString="Data Source=.;Initial Catalog=BootstrapAdmin;User ID=ba;Password=ba20171231"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
|
||||
<cacheManagerList>
|
||||
<add key="bd" url="http://118.244.234.207:8082/BA/CacheList.axd?cacheKey={0}" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="cps" url="http://118.244.234.207:8082/CPS/CacheList.axd?cacheKey={0}" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
</cacheManagerList>
|
||||
|
||||
<system.web>
|
||||
<!--
|
||||
In the example below, the "Replace" transform will replace the entire
|
||||
<customErrors> section of your web.config file.
|
||||
Note that because there is only one customErrors section under the
|
||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||
|
||||
<customErrors defaultRedirect="GenericError.htm"
|
||||
mode="RemoteOnly" xdt:Transform="Replace">
|
||||
<error statusCode="500" redirect="InternalError.htm"/>
|
||||
</customErrors>
|
||||
-->
|
||||
</system.web>
|
||||
</configuration>
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<!--
|
||||
In the example below, the "SetAttributes" transform will change the value of
|
||||
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||
finds an attribute "name" that has a value of "MyDB".
|
||||
-->
|
||||
|
||||
<connectionStrings>
|
||||
<add name="SQL"
|
||||
connectionString="Data Source=.;Initial Catalog=BootstrapAdmin;User ID=ba;Password=ba20171231"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
<add name="ba"
|
||||
connectionString="Data Source=.;Initial Catalog=BootstrapAdmin;User ID=ba;Password=ba20171231"
|
||||
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||
</connectionStrings>
|
||||
|
||||
<cacheManagerList>
|
||||
<add key="bd" url="http://118.244.234.207:8080/BA/CacheList.axd?cacheKey={0}" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
<add key="bccs" url="http://118.244.234.207:8080/CPS/CacheList.axd?cacheKey={0}" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
|
||||
</cacheManagerList>
|
||||
|
||||
<system.web>
|
||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||
<!--
|
||||
In the example below, the "Replace" transform will replace the entire
|
||||
<customErrors> section of your web.config file.
|
||||
Note that because there is only one customErrors section under the
|
||||
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||
|
||||
<customErrors defaultRedirect="GenericError.htm"
|
||||
mode="RemoteOnly" xdt:Transform="Replace">
|
||||
<error statusCode="500" redirect="InternalError.htm"/>
|
||||
</customErrors>
|
||||
-->
|
||||
</system.web>
|
||||
</configuration>
|
|
@ -34,12 +34,17 @@
|
|||
<add key="BootstrapDict-RetrieveDicts" interval="600" desc="所有字典数据缓存" />
|
||||
<add key="BootstrapUser-RetrieveUsers" interval="600" desc="所有用户数据缓存" />
|
||||
<add key="BootstrapUser-RetrieveUsersByName" interval="600" desc="指定用户数据缓存" />
|
||||
<add key="BootstrapUser-RetrieveUsersByRoleId" interval="600" desc="指定角色用户数据缓存" />
|
||||
<add key="BootstrapUser-RetrieveUsersByGroupId" interval="600" desc="指定组用户数据缓存" />
|
||||
|
||||
<add key="UserHelper-RetrieveNewUsers" interval="30" desc="新用户数据缓存" />
|
||||
<add key="MenuHelper-RetrieveMenusByRoleId" interval="600" desc="角色菜单信息缓存" />
|
||||
|
||||
<add key="RoleHelper-RetrieveRoles" interval="600" desc="所有角色数据缓存" />
|
||||
<add key="RoleHelper-RetrieveRolesByUserId" interval="600" desc="指定用户角色数据缓存" />
|
||||
<add key="RoleHelper-RetrieveRolesByMenuId" interval="600" desc="指定菜单角色数据缓存" />
|
||||
<add key="RoleHelper-RetrieveRolesByGroupId" interval="600" desc="指定组角色数据缓存" />
|
||||
|
||||
<add key="GroupHelper-RetrieveGroups" interval="600" desc="所有组数据缓存" />
|
||||
<add key="GroupHelper-RetrieveGroupsByUserId" interval="600" desc="指定用户组数据缓存" />
|
||||
<add key="GroupHelper-RetrieveGroupsByRoleId" interval="600" desc="指定角色组数据缓存" />
|
||||
|
@ -49,8 +54,6 @@
|
|||
<add key="ExceptionHelper-RetrieveExceptions" interval="600" desc="程序异常数据缓存" />
|
||||
<add key="MessageHelper-RetrieveMessages" interval="600" desc="站内消息数据缓存" />
|
||||
<add key="TaskHelper-RetrieveTasks" interval="600" desc="所有任务数据缓存" />
|
||||
<add key="BootstrapUser-RetrieveUsersByRoleId" interval="600" desc="指定角色用户数据缓存" />
|
||||
<add key="BootstrapUser-RetrieveUsersByGroupId" interval="600" desc="指定组用户数据缓存" />
|
||||
<add key="WebApi" interval="21600" desc="WebApi 数据缓存" />
|
||||
<add key="Token" interval="21600" desc="Token 数据缓存" />
|
||||
</cacheManager>
|
||||
|
@ -82,7 +85,7 @@
|
|||
<compilation debug="true" targetFramework="4.5" />
|
||||
<httpRuntime targetFramework="4.5" />
|
||||
<authentication mode="Forms">
|
||||
<forms defaultUrl="~/" loginUrl="~/Home/Login" name="__bd__" protection="All" timeout="360" />
|
||||
<forms defaultUrl="~/" loginUrl="~/Home/Login" name="__bd__" protection="All" path="/" timeout="360" />
|
||||
</authentication>
|
||||
<pages>
|
||||
<namespaces>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
"Default": "Warning"
|
||||
},
|
||||
"LgbFile": {
|
||||
"IncludeScopes": true,
|
||||
"LogLevel": {
|
||||
"Default": "Error"
|
||||
},
|
||||
"FileName": "Error\\Log.log"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"ba": "Data Source=.;Initial Catalog=BootstrapAdmin;User ID=sa;Password=sa"
|
||||
},
|
||||
"DbProviderFactories": {
|
||||
"sql": "SQLServer"
|
||||
},
|
||||
",": null,
|
||||
"KeyPath": "C:\\keys"
|
||||
}
|
|
@ -0,0 +1,198 @@
|
|||
{
|
||||
"LongbowCache": {
|
||||
"Enabled": true,
|
||||
"CorsItems": [
|
||||
{
|
||||
"Enabled": true,
|
||||
"Name": "ba",
|
||||
"Url": "http://localhost:50852/CacheList.axd?cacheKey={0}",
|
||||
"Desc": "后台管理数据缓存接口",
|
||||
"Self": true
|
||||
}
|
||||
],
|
||||
"CacheItems": [
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "BootstrapAdminAuthorizeFilter-RetrieveRolesByUrl",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "后台菜单获得所有可访问角色数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "BootstrapAdminGroupMiddleware-RetrieveGroups",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "后台管理所有组数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "BootstrapAdminGroupMiddleware-RetrieveGroupsByUserName",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "后台管理特定用户所属所有组数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "BootstrapAdminRoleMiddleware-RetrieveRoles",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "后台管理所有角色数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "BootstrapAdminRoleMiddleware-RetrieveRolesByUserName",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "后台管理特定用户所属所有角色数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "BootstrapDict-RetrieveDicts",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "后台管理所有字典数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "BootstrapMenu-RetrieveMenus",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "后台管理所有菜单数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "BootstrapUser-RetrieveUsers",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "后台管理所有用户数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "BootstrapUser-RetrieveUsersByName",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "后台管理通过登录名获得当前用户数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "UserHelper-RetrieveNewUsers",
|
||||
"Interval": 30,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "新用户数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "MenuHelper-RetrieveMenusByRoleId",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "角色菜单信息缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "RoleHelper-RetrieveRoles",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "所有角色数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "RoleHelper-RetrieveRolesByUserId",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "指定用户角色数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "RoleHelper-RetrieveRolesByMenuId",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "指定菜单角色数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "RoleHelper-RetrieveRolesByGroupId",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "指定组角色数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "GroupHelper-RetrieveGroups",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "所有组数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "GroupHelper-RetrieveGroupsByUserId",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "指定用户组数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "GroupHelper-RetrieveGroupsByRoleId",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "指定角色组数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "LogHelper-RetrieveLogs",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "所有日志数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "DictHelper-RetrieveDictsCategory",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "字典分类数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "NotificationHelper-RetrieveNotifications",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "通知管理数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "ExceptionHelper-RetrieveExceptions",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "程序异常数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "MessageHelper-RetrieveMessages",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "站内消息数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "TaskHelper-RetrieveTasks",
|
||||
"Interval": 600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "所有任务数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "WebApi",
|
||||
"Interval": 21600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "WebApi 数据缓存"
|
||||
},
|
||||
{
|
||||
"Enabled": true,
|
||||
"Key": "Token",
|
||||
"Interval": 21600,
|
||||
"SlidingExpiration": true,
|
||||
"Desc": "Token 数据缓存"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="bootstrap" version="3.3.7" targetFramework="net45" />
|
||||
<package id="FontAwesome" version="4.7.0" targetFramework="net45" />
|
||||
<package id="jQuery" version="3.1.1" targetFramework="net45" />
|
||||
<package id="jQuery.Validation" version="1.16.0" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
||||
</packages>
|
|
@ -1,11 +1,11 @@
|
|||
.alert {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
right: 15px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.alert div {
|
||||
display: inline-block;
|
||||
}
|
||||
.alert {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
right: 15px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.alert div {
|
||||
display: inline-block;
|
||||
}
|
|
@ -1,131 +1,131 @@
|
|||
@media (min-width: 375px) {
|
||||
.hidden-375 {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a {
|
||||
padding: 0 20px;
|
||||
border-left: solid 1px #aeb2b7;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a:first-child {
|
||||
border-left: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 568px) {
|
||||
.toolbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bs-bars {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.sidebar {
|
||||
top: 98px;
|
||||
bottom: 40px;
|
||||
position: absolute;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.form-group .form-control-url {
|
||||
width: 442px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 769px) {
|
||||
.sidebar {
|
||||
display: block;
|
||||
width: 210px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 210px;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.main-content.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
aside {
|
||||
transition: none;
|
||||
transform: none;
|
||||
top: 0;
|
||||
right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 940px) {
|
||||
.hidden-tb {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
width: 900px;
|
||||
}
|
||||
|
||||
.form-group .form-control-url {
|
||||
width: 742px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 414px) {
|
||||
.modal .modal-body {
|
||||
max-height: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 568px) {
|
||||
.modal .modal-body {
|
||||
max-height: 350px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 667px) {
|
||||
.modal .modal-body {
|
||||
max-height: 450px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 736px) {
|
||||
.modal .modal-body {
|
||||
max-height: 510px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 768px) {
|
||||
.modal .modal-body {
|
||||
max-height: 540px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 672px) {
|
||||
.sidebar {
|
||||
top: 98px;
|
||||
bottom: 40px;
|
||||
position: absolute;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.main-content.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
aside {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.aside.open {
|
||||
transform: translate(0);
|
||||
}
|
||||
}
|
||||
@media (min-width: 375px) {
|
||||
.hidden-375 {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a {
|
||||
padding: 0 20px;
|
||||
border-left: solid 1px #aeb2b7;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a:first-child {
|
||||
border-left: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 568px) {
|
||||
.toolbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bs-bars {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.sidebar {
|
||||
top: 98px;
|
||||
bottom: 40px;
|
||||
position: absolute;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.form-group .form-control-url {
|
||||
width: 442px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 769px) {
|
||||
.sidebar {
|
||||
display: block;
|
||||
width: 210px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 210px;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.main-content.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
aside {
|
||||
transition: none;
|
||||
transform: none;
|
||||
top: 0;
|
||||
right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 940px) {
|
||||
.hidden-tb {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
width: 900px;
|
||||
}
|
||||
|
||||
.form-group .form-control-url {
|
||||
width: 742px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 414px) {
|
||||
.modal .modal-body {
|
||||
max-height: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 568px) {
|
||||
.modal .modal-body {
|
||||
max-height: 350px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 667px) {
|
||||
.modal .modal-body {
|
||||
max-height: 450px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 736px) {
|
||||
.modal .modal-body {
|
||||
max-height: 510px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 768px) {
|
||||
.modal .modal-body {
|
||||
max-height: 540px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-height: 672px) {
|
||||
.sidebar {
|
||||
top: 98px;
|
||||
bottom: 40px;
|
||||
position: absolute;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.main-content.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
aside {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.aside.open {
|
||||
transform: translate(0);
|
||||
}
|
||||
}
|
|
@ -1,492 +1,492 @@
|
|||
.lgbDropdown {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.lgbDropdown .dropdown-menu > li > a:hover {
|
||||
background: #007AC0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.logTs, .logSql, .logDbExcep {
|
||||
color: red;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.logExcep {
|
||||
color: #337ab7;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.logMsg {
|
||||
color: #ce2520;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.hidden-tb, .hidden-375 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.clearcache {
|
||||
position: absolute;
|
||||
right: 60px;
|
||||
font-size: 1.7rem;
|
||||
color: #d9534f;
|
||||
margin-top: -1px;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||
}
|
||||
|
||||
.clearcache:hover, .clearcache:focus {
|
||||
color: #c12e2a;
|
||||
}
|
||||
|
||||
.clearcache:active:hover {
|
||||
color: #ac2925;
|
||||
}
|
||||
|
||||
.form-inline .form-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.form-inline .form-group .control-label {
|
||||
margin-right: 10px;
|
||||
width: 80px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
.modal-dialog .modal-body, .panel-body {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.modal-dialog .modal-body .form-inline .form-group input[type="text"], .modal-dialog .modal-body .form-inline .form-group input[type="password"] {
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.btn:focus, .btn:active:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.btn span:last-child {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.modal .modal-dialog {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.modal .modal-body {
|
||||
max-height: 164px;
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.modal.file-zoom-dialog .modal-dialog {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
background-color: #f5f5f5;
|
||||
border-top-left-radius: 6px;
|
||||
border-top-right-radius: 6px;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.modal-header .close {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.modal-body .checkbox, .modal-body .radio {
|
||||
min-width: 190px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.modal-footer .btn {
|
||||
padding-left: 22px;
|
||||
padding-right: 22px;
|
||||
}
|
||||
|
||||
.has-error input {
|
||||
background-repeat: no-repeat;
|
||||
background-image: url('images/error.png');
|
||||
background-position: right 8px center;
|
||||
}
|
||||
|
||||
.has-error .input-group-btn button, .has-error .input-group-btn button:active:focus {
|
||||
border-color: #a94442;
|
||||
}
|
||||
|
||||
.has-success input {
|
||||
background-repeat: no-repeat;
|
||||
background-image: url('images/success.png');
|
||||
background-position: right 8px center;
|
||||
}
|
||||
|
||||
.has-success .input-group-btn button, .has-success .input-group-btn button:active:focus {
|
||||
border-color: #3c763d;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
transition: all .4s ease-in-out;
|
||||
padding: 15px 15px 0 15px;
|
||||
margin-left: 0;
|
||||
height: auto;
|
||||
left: 0;
|
||||
bottom: 40px;
|
||||
right: 0;
|
||||
top: 98px;
|
||||
}
|
||||
|
||||
.main-content.open {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-content.closed {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.main-content > .panel:last-child .panel-body {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.main-content > .panel > .panel-body > .modal-footer {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
aside {
|
||||
transition: transform .4s ease-in-out;
|
||||
transform: translate(-100%);
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 98px;
|
||||
bottom: 40px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
aside.open {
|
||||
transform: translate(0);
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
display: none;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
z-index: 5;
|
||||
background: #2a3542;
|
||||
}
|
||||
|
||||
.sidebar-menu {
|
||||
padding: 20px 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.sidebar-menu .dcjq-icon {
|
||||
height: 17px;
|
||||
width: 17px;
|
||||
display: inline-block;
|
||||
background: url(images/nav-expand.png) no-repeat;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sidebar-menu .active .dcjq-icon {
|
||||
background-position: bottom;
|
||||
}
|
||||
|
||||
.sidebar-menu li {
|
||||
margin: 5px 10px;
|
||||
}
|
||||
|
||||
.sidebar-menu li a {
|
||||
color: #aeb2b7;
|
||||
display: block;
|
||||
padding: 15px 10px;
|
||||
font-size: 1.2rem;
|
||||
transition: all 0.3s ease;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.sidebar-menu li a.active, .sidebar-menu li a:hover, .sidebar-menu li a:focus {
|
||||
background: #35404d;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sidebar-menu li a.active i {
|
||||
color: #FF6C60;
|
||||
}
|
||||
|
||||
.sidebar-menu li a i {
|
||||
font-size: 1.5rem;
|
||||
width: 22px;
|
||||
}
|
||||
|
||||
.sidebar-menu li .sub {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.sidebar-menu li .sub li a:hover, .sidebar-menu li .sub li.active a {
|
||||
color: #FF6C60;
|
||||
transition: all 0.3s ease;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sidebar-menu li .sub li {
|
||||
background: #35404D;
|
||||
margin: 0;
|
||||
padding: 0 10px 0 32px;
|
||||
}
|
||||
|
||||
.sidebar-menu li .sub li:last-child {
|
||||
border-radius: 0 0 4px 4px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.sidebar-menu li .sub li a {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
/*Modal Dialog Checkbox*/
|
||||
.modal-body .checkbox, .modal-dialog .radio {
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.modal-body .checkbox label, .modal-body .radio label {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.modal-body .checkbox label input[type='checkbox'], .modal-body .radio label input[type='radio'] {
|
||||
margin: 0 4px 0 0;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.modal-body .affix {
|
||||
position: fixed;
|
||||
bottom: 95px;
|
||||
right: 50px;
|
||||
}
|
||||
|
||||
.modal-body .affix a {
|
||||
font-size: 2rem;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.bs-bars {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: relative;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu {
|
||||
margin-top: 4px;
|
||||
min-width: inherit;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a {
|
||||
border-left: none;
|
||||
padding: 0 14px;
|
||||
display: table-cell;
|
||||
color: #504d4d;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a:first-child {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a:last-child {
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a:hover {
|
||||
color: #235e90;
|
||||
}
|
||||
|
||||
/*cache*/
|
||||
.panel .fa-refresh {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.bootstrap-select .dropdown-menu {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.bootstrap-select .dropdown-menu > li > a {
|
||||
padding-top: 7px;
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
|
||||
input[type="datetime"] {
|
||||
min-width: 220px;
|
||||
}
|
||||
|
||||
/*Messages*/
|
||||
.mail-box {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.mail-box .sm-side {
|
||||
flex: 0.4;
|
||||
background: #e5e8ef;
|
||||
border-radius: 4px 0 0 4px;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head {
|
||||
background: #00a8b3;
|
||||
border-radius: 4px 0 0 0;
|
||||
padding: 10px;
|
||||
color: #fff;
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head .inbox-avatar {
|
||||
width: 65px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head .inbox-avatar img {
|
||||
height: 65px;
|
||||
border-radius: 4px;
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head .user-name {
|
||||
display: inline-block;
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head .user-name h5 {
|
||||
margin-top: 15px;
|
||||
margin-bottom: 0;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head .user-name h5 a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .inbox-body, .mail-box .lg-side .inbox-body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .inbox-body .btn-compose {
|
||||
background: #ff6c60;
|
||||
padding: 12px 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .inbox-body .btn-compose:hover {
|
||||
background: #f5675c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav li {
|
||||
display: inline-block;
|
||||
line-height: 45px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav li a {
|
||||
color: #6a6a6a;
|
||||
line-height: 45px;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav li a:hover, .mail-box .sm-side ul.inbox-nav li.active a, .mail-box .sm-side ul.inbox-nav li a:focus {
|
||||
color: #6a6a6a;
|
||||
background: #d5d7de;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav li a .label {
|
||||
margin-top: 13px;
|
||||
padding: 0.5em 0.8em;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav li a i {
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.mail-box .lg-side {
|
||||
flex: 0.6;
|
||||
background: #fff;
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .inbox-head {
|
||||
padding: 12px;
|
||||
background: #41cac0;
|
||||
color: #fff;
|
||||
border-radius: 0 4px 0 0;
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .table-inbox {
|
||||
border: 1px solid #d3d3d3;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .table-inbox .unread td {
|
||||
font-weight: 600;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .table-inbox tr td {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .table-inbox tr td .fa-star.inbox-started, .mail-box .lg-side .table-inbox tr td .fa-star:hover {
|
||||
color: #f78a09;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .table-inbox tr td:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*Bootstrap Table BUG */
|
||||
.fixed-table-loading {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.bootstrap-table {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-body .table {
|
||||
border-bottom: none;
|
||||
}
|
||||
/*Bootstrap Table BUG END*/
|
||||
|
||||
.input-group.form_date span {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.barTable {
|
||||
padding: 5px 15px 15px 15px;
|
||||
}
|
||||
.lgbDropdown {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.lgbDropdown .dropdown-menu > li > a:hover {
|
||||
background: #007AC0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.logTs, .logSql, .logDbExcep {
|
||||
color: red;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.logExcep {
|
||||
color: #337ab7;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.logMsg {
|
||||
color: #ce2520;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.hidden-tb, .hidden-375 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.clearcache {
|
||||
position: absolute;
|
||||
right: 60px;
|
||||
font-size: 1.7rem;
|
||||
color: #d9534f;
|
||||
margin-top: -1px;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||
}
|
||||
|
||||
.clearcache:hover, .clearcache:focus {
|
||||
color: #c12e2a;
|
||||
}
|
||||
|
||||
.clearcache:active:hover {
|
||||
color: #ac2925;
|
||||
}
|
||||
|
||||
.form-inline .form-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.form-inline .form-group .control-label {
|
||||
margin-right: 10px;
|
||||
width: 80px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
.modal-dialog .modal-body, .panel-body {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.modal-dialog .modal-body .form-inline .form-group input[type="text"], .modal-dialog .modal-body .form-inline .form-group input[type="password"] {
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.btn:focus, .btn:active:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.btn span:last-child {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.modal .modal-dialog {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.modal .modal-body {
|
||||
max-height: 164px;
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.modal.file-zoom-dialog .modal-dialog {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
background-color: #f5f5f5;
|
||||
border-top-left-radius: 6px;
|
||||
border-top-right-radius: 6px;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.modal-header .close {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.modal-body .checkbox, .modal-body .radio {
|
||||
min-width: 190px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.modal-footer .btn {
|
||||
padding-left: 22px;
|
||||
padding-right: 22px;
|
||||
}
|
||||
|
||||
.has-error input {
|
||||
background-repeat: no-repeat;
|
||||
background-image: url('../images/error.png');
|
||||
background-position: right 8px center;
|
||||
}
|
||||
|
||||
.has-error .input-group-btn button, .has-error .input-group-btn button:active:focus {
|
||||
border-color: #a94442;
|
||||
}
|
||||
|
||||
.has-success input {
|
||||
background-repeat: no-repeat;
|
||||
background-image: url('../images/success.png');
|
||||
background-position: right 8px center;
|
||||
}
|
||||
|
||||
.has-success .input-group-btn button, .has-success .input-group-btn button:active:focus {
|
||||
border-color: #3c763d;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
transition: all .4s ease-in-out;
|
||||
padding: 15px 15px 0 15px;
|
||||
margin-left: 0;
|
||||
height: auto;
|
||||
left: 0;
|
||||
bottom: 40px;
|
||||
right: 0;
|
||||
top: 98px;
|
||||
}
|
||||
|
||||
.main-content.open {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-content.closed {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.main-content > .panel:last-child .panel-body {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.main-content > .panel > .panel-body > .modal-footer {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
aside {
|
||||
transition: transform .4s ease-in-out;
|
||||
transform: translate(-100%);
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 98px;
|
||||
bottom: 40px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
aside.open {
|
||||
transform: translate(0);
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
display: none;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
z-index: 5;
|
||||
background: #2a3542;
|
||||
}
|
||||
|
||||
.sidebar-menu {
|
||||
padding: 20px 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.sidebar-menu .dcjq-icon {
|
||||
height: 17px;
|
||||
width: 17px;
|
||||
display: inline-block;
|
||||
background: url(../images/nav-expand.png) no-repeat;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sidebar-menu .active .dcjq-icon {
|
||||
background-position: bottom;
|
||||
}
|
||||
|
||||
.sidebar-menu li {
|
||||
margin: 5px 10px;
|
||||
}
|
||||
|
||||
.sidebar-menu li a {
|
||||
color: #aeb2b7;
|
||||
display: block;
|
||||
padding: 15px 10px;
|
||||
font-size: 1.2rem;
|
||||
transition: all 0.3s ease;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.sidebar-menu li a.active, .sidebar-menu li a:hover, .sidebar-menu li a:focus {
|
||||
background: #35404d;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sidebar-menu li a.active i {
|
||||
color: #FF6C60;
|
||||
}
|
||||
|
||||
.sidebar-menu li a i {
|
||||
font-size: 1.5rem;
|
||||
width: 22px;
|
||||
}
|
||||
|
||||
.sidebar-menu li .sub {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.sidebar-menu li .sub li a:hover, .sidebar-menu li .sub li.active a {
|
||||
color: #FF6C60;
|
||||
transition: all 0.3s ease;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sidebar-menu li .sub li {
|
||||
background: #35404D;
|
||||
margin: 0;
|
||||
padding: 0 10px 0 32px;
|
||||
}
|
||||
|
||||
.sidebar-menu li .sub li:last-child {
|
||||
border-radius: 0 0 4px 4px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.sidebar-menu li .sub li a {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
/*Modal Dialog Checkbox*/
|
||||
.modal-body .checkbox, .modal-dialog .radio {
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.modal-body .checkbox label, .modal-body .radio label {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.modal-body .checkbox label input[type='checkbox'], .modal-body .radio label input[type='radio'] {
|
||||
margin: 0 4px 0 0;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.modal-body .affix {
|
||||
position: fixed;
|
||||
bottom: 95px;
|
||||
right: 50px;
|
||||
}
|
||||
|
||||
.modal-body .affix a {
|
||||
font-size: 2rem;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.bs-bars {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: relative;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu {
|
||||
margin-top: 4px;
|
||||
min-width: inherit;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a {
|
||||
border-left: none;
|
||||
padding: 0 14px;
|
||||
display: table-cell;
|
||||
color: #504d4d;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a:first-child {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a:last-child {
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.toolbar .dropdown-menu a:hover {
|
||||
color: #235e90;
|
||||
}
|
||||
|
||||
/*cache*/
|
||||
.panel .fa-refresh {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.bootstrap-select .dropdown-menu {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.bootstrap-select .dropdown-menu > li > a {
|
||||
padding-top: 7px;
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
|
||||
input[type="datetime"] {
|
||||
min-width: 220px;
|
||||
}
|
||||
|
||||
/*Messages*/
|
||||
.mail-box {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.mail-box .sm-side {
|
||||
flex: 0.4;
|
||||
background: #e5e8ef;
|
||||
border-radius: 4px 0 0 4px;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head {
|
||||
background: #00a8b3;
|
||||
border-radius: 4px 0 0 0;
|
||||
padding: 10px;
|
||||
color: #fff;
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head .inbox-avatar {
|
||||
width: 65px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head .inbox-avatar img {
|
||||
height: 65px;
|
||||
border-radius: 4px;
|
||||
border: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head .user-name {
|
||||
display: inline-block;
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head .user-name h5 {
|
||||
margin-top: 15px;
|
||||
margin-bottom: 0;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .user-head .user-name h5 a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .inbox-body, .mail-box .lg-side .inbox-body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .inbox-body .btn-compose {
|
||||
background: #ff6c60;
|
||||
padding: 12px 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mail-box .sm-side .inbox-body .btn-compose:hover {
|
||||
background: #f5675c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav li {
|
||||
display: inline-block;
|
||||
line-height: 45px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav li a {
|
||||
color: #6a6a6a;
|
||||
line-height: 45px;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav li a:hover, .mail-box .sm-side ul.inbox-nav li.active a, .mail-box .sm-side ul.inbox-nav li a:focus {
|
||||
color: #6a6a6a;
|
||||
background: #d5d7de;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav li a .label {
|
||||
margin-top: 13px;
|
||||
padding: 0.5em 0.8em;
|
||||
}
|
||||
|
||||
.mail-box .sm-side ul.inbox-nav li a i {
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.mail-box .lg-side {
|
||||
flex: 0.6;
|
||||
background: #fff;
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .inbox-head {
|
||||
padding: 12px;
|
||||
background: #41cac0;
|
||||
color: #fff;
|
||||
border-radius: 0 4px 0 0;
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .table-inbox {
|
||||
border: 1px solid #d3d3d3;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .table-inbox .unread td {
|
||||
font-weight: 600;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .table-inbox tr td {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .table-inbox tr td .fa-star.inbox-started, .mail-box .lg-side .table-inbox tr td .fa-star:hover {
|
||||
color: #f78a09;
|
||||
}
|
||||
|
||||
.mail-box .lg-side .table-inbox tr td:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*Bootstrap Table BUG */
|
||||
.fixed-table-loading {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.bootstrap-table {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.bootstrap-table .fixed-table-body .table {
|
||||
border-bottom: none;
|
||||
}
|
||||
/*Bootstrap Table BUG END*/
|
||||
|
||||
.input-group.form_date span {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.barTable {
|
||||
padding: 5px 15px 15px 15px;
|
||||
}
|
|
@ -1,35 +1,35 @@
|
|||
h3 {
|
||||
margin-top: 0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.btn {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.control-label {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.main-content > section:not(:first-child) {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.main-content > section > div {
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
.main-content > section > div > div {
|
||||
display: inline-block;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.test {
|
||||
display: none;
|
||||
padding: 10px 0 0 0;
|
||||
color: #5cb85c;
|
||||
}
|
||||
h3 {
|
||||
margin-top: 0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.btn {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.control-label {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.main-content > section:not(:first-child) {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.main-content > section > div {
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
.main-content > section > div > div {
|
||||
display: inline-block;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.test {
|
||||
display: none;
|
||||
padding: 10px 0 0 0;
|
||||
color: #5cb85c;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue