Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
239 changes: 208 additions & 31 deletions csharp/admin/AdminMvc/AdminMvc.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,63 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.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')" />
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Health.Direct.Admin.Console</RootNamespace>
<AssemblyName>Health.Direct.Admin.Console</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<PreserveCompilationContext>true</PreserveCompilationContext>
<UseAppHost>false</UseAppHost>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<EnableDefaultContentItems>false</EnableDefaultContentItems>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</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' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.3.0" />
<PackageReference Include="Microsoft.AspNet.Razor" Version="3.3.0" />
Expand All @@ -22,32 +68,163 @@
<PackageReference Include="AutoMapper" Version="3.1.1" />
<PackageReference Include="Microsoft.IdentityModel.Logging" Version="8.0.1" />
</ItemGroup>

<!-- Restore key framework refs that were explicit in the old csproj -->
<ItemGroup>
<Reference Include="System.Web" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Configuration" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <!-- added -->
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\common\common.csproj" />
<ProjectReference Include="..\..\config\client\config.client.csproj" />
<ProjectReference Include="..\..\diagnostics\diagnostics.nlog.csproj" />
<Compile Include="Common\DirectMembershipProvider.cs" />
<Compile Include="Common\DomainNameAttribute.cs" />
<Compile Include="Common\Formatter.cs" />
<Compile Include="Common\HtmlHelperExtensions.cs" />
<Compile Include="Controllers\AccountController.cs" />
<Compile Include="Controllers\AddressesController.cs" />
<Compile Include="Controllers\AnchorsController.cs" />
<Compile Include="Controllers\CertificatesController.cs" />
<Compile Include="Controllers\ControllerBase.cs" />
<Compile Include="Controllers\ControllerErrorBase.cs" />
<Compile Include="Controllers\DnsRecordsController.cs" />
<Compile Include="Controllers\DomainsController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\MdnRecordsController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Models\AccountModels.cs" />
<Compile Include="Models\AddressModel.cs" />
<Compile Include="Models\AddressRecordModel.cs" />
<Compile Include="Models\AnchorModel.cs" />
<Compile Include="Models\AnchorUploadModel.cs" />
<Compile Include="Models\CertificateModel.cs" />
<Compile Include="Models\CertificateUploadModel.cs" />
<Compile Include="Models\DnsRecordModel.cs" />
<Compile Include="Models\DomainModel.cs" />
<Compile Include="Models\MdnModel.cs" />
<Compile Include="Models\ModelProfiles.cs" />
<Compile Include="Models\MxRecordModel.cs" />
<Compile Include="Models\Pagination\PaginatedList.cs" />
<Compile Include="Models\PropertiesMustMatchAttribute.cs" />
<Compile Include="Models\Repositories\AddressRepository.cs" />
<Compile Include="Models\Repositories\AnchorRepository.cs" />
<Compile Include="Models\Repositories\AuthRepository.cs" />
<Compile Include="Models\Repositories\CertificateRepository.cs" />
<Compile Include="Models\Repositories\DnsRecordRepository.cs" />
<Compile Include="Models\Repositories\DomainRepository.cs" />
<Compile Include="Models\Repositories\IAddressRepository.cs" />
<Compile Include="Models\Repositories\IAnchorRepository.cs" />
<Compile Include="Models\Repositories\IAuthRepository.cs" />
<Compile Include="Models\Repositories\ICertificateRepository.cs" />
<Compile Include="Models\Repositories\IDnsRecordRepository.cs" />
<Compile Include="Models\Repositories\IDomainRepository.cs" />
<Compile Include="Models\Repositories\IMdnRecordRepository.cs" />
<Compile Include="Models\Repositories\IRepository.cs" />
<Compile Include="Models\Repositories\MdnRecordRepository.cs" />
<Compile Include="Models\Repositories\RepositoryModule.cs" />
<Compile Include="Models\ResolveModel.cs" />
<Compile Include="Models\SoaRecordModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<Content Include="Config\dev.client.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Site.css" />
<Content Include="Global.asax" />
<Content Include="Scripts\jquery-1.4.1.js" />
<Content Include="Scripts\jquery-1.4.1.min.js" />
<Content Include="Scripts\jquery-1.4.1-vsdoc.js" />
<Content Include="Scripts\MicrosoftAjax.debug.js" />
<Content Include="Scripts\MicrosoftAjax.js" />
<Content Include="Scripts\MicrosoftMvcAjax.debug.js" />
<Content Include="Scripts\MicrosoftMvcAjax.js" />
<Content Include="Scripts\MicrosoftMvcValidation.debug.js" />
<Content Include="Scripts\MicrosoftMvcValidation.js" />
<Content Include="Views\Web.config" />
<Content Include="Web.config" />
<Content Include="Views\**\*.*" />
<Content Include="Content\**\*.*" />
<Content Include="Scripts\**\*.*" />
<None Include="Config\dev.client.config" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

</Project>
<ItemGroup>
<Content Include="Views\Account\ChangePassword.aspx" />
<Content Include="Views\Account\ChangePasswordSuccess.aspx" />
<Content Include="Views\Account\LogOn.aspx" />
<Content Include="Views\Addresses\AddressDetails.ascx" />
<Content Include="Views\Addresses\AddressEntry.ascx" />
<Content Include="Views\Addresses\AddressList.ascx" />
<Content Include="Views\Addresses\EditAddress.aspx" />
<Content Include="Views\Addresses\Index.aspx" />
<Content Include="Views\Anchors\AnchorDetails.ascx" />
<Content Include="Views\Anchors\AnchorList.ascx" />
<Content Include="Views\Anchors\Index.aspx" />
<Content Include="Views\Certificates\CertificateDetails.ascx" />
<Content Include="Views\Certificates\CertificateList.ascx" />
<Content Include="Views\Certificates\Index.aspx" />
<Content Include="Views\DnsRecords\AddressRecordDetails.ascx" />
<Content Include="Views\DnsRecords\AddressRecordEntry.ascx" />
<Content Include="Views\DnsRecords\AddressRecordList.ascx" />
<Content Include="Views\DnsRecords\CertRecordDetails.ascx" />
<Content Include="Views\DnsRecords\CertRecordList.ascx" />
<Content Include="Views\DnsRecords\DnsRecordDetails.ascx" />
<Content Include="Views\DnsRecords\DnsRecordList.ascx" />
<Content Include="Views\DnsRecords\EditAddressRecord.aspx" />
<Content Include="Views\DnsRecords\EditMxRecord.aspx" />
<Content Include="Views\DnsRecords\EditNSRecord.aspx" />
<Content Include="Views\DnsRecords\EditSoaRecord.aspx" />
<Content Include="Views\DnsRecords\Index.aspx" />
<Content Include="Views\DnsRecords\MxRecordDetails.ascx" />
<Content Include="Views\DnsRecords\MxRecordEntry.ascx" />
<Content Include="Views\DnsRecords\MxRecordList.ascx" />
<Content Include="Views\DnsRecords\NSRecordDetails.ascx" />
<Content Include="Views\DnsRecords\NSRecordEntry.ascx" />
<Content Include="Views\DnsRecords\NSRecordList.ascx" />
<Content Include="Views\DnsRecords\SoaRecordDetails.ascx" />
<Content Include="Views\DnsRecords\SoaRecordEntry.ascx" />
<Content Include="Views\DnsRecords\SoaRecordList.ascx" />
<Content Include="Views\Domains\CreateDomain.aspx" />
<Content Include="Views\Domains\DomainDetails.ascx" />
<Content Include="Views\Domains\DomainEntry.ascx" />
<Content Include="Views\Domains\DomainList.ascx" />
<Content Include="Views\Domains\EditDomain.aspx" />
<Content Include="Views\Domains\Index.aspx" />
<Content Include="Views\Home\Index.aspx" />
<Content Include="Views\MdnRecords\Index.aspx" />
<Content Include="Views\MdnRecords\MdnDetails.ascx" />
<Content Include="Views\MdnRecords\MdnList.ascx" />
<Content Include="Views\Shared\Error.aspx" />
<Content Include="Views\Shared\LogOnUserControl.ascx" />
<Content Include="Views\Shared\Site.Master" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\common\common.csproj">
<Project>{6bc0ce68-3bcf-4be8-8b04-ef2e9f786db3}</Project>
<Name>common</Name>
</ProjectReference>
<ProjectReference Include="..\..\config\client\config.client.csproj">
<Project>{8b0fea15-5031-4616-89ad-cafd39c70e63}</Project>
<Name>config.client</Name>
</ProjectReference>
<ProjectReference Include="..\..\diagnostics\diagnostics.nlog.csproj">
<Project>{a0f8ba3a-ae78-4c89-9d86-c925e53deef5}</Project>
<Name>diagnostics.nlog</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</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>8080</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:8080/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ protected override void Load(ContainerBuilder builder)

builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof (DomainManagerClient)))
.Where(t => t.Name.EndsWith("Client"))
.AsSelf()
.AsImplementedInterfaces();
}
}
Expand Down
19 changes: 0 additions & 19 deletions csharp/admin/AdminMvc/Properties/launchSettings.json

This file was deleted.

71 changes: 48 additions & 23 deletions csharp/admin/AdminMvc/Views/Addresses/AddressList.ascx
Original file line number Diff line number Diff line change
@@ -1,31 +1,56 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<AddressModel>>" %>
<%@ Import Namespace="Health.Direct.Admin.Console.Common"%>
<%@ Import Namespace="MvcContrib.UI.Grid"%>
<%@ Import Namespace="MvcContrib.UI.Pager"%>
<%@ Import Namespace="MvcContrib.Pagination"%>
<%@ Import Namespace="Health.Direct.Admin.Console.Models"%>

<%= Html.Grid(Model)
.Attributes(@class => "grid ui-widget ui-widget-content")
.HeaderRowAttributes(new Dictionary<string, object> { { "class", "ui-widget-header" } })
.Columns(
column =>
{
column.For(a => a.DomainID).Visible(ViewData["Domain"] == null).Named("Domain ID");
column.For(a => a.EmailAddress);
column.For(a => a.DisplayName);
column.For(a => a.Status).Attributes(@class => "status");
column.For(d => Html.Span(Formatter.Format(d.CreateDate), new { title = d.CreateDate })).Named("Created On");
column.For(d => Html.Span(Formatter.Format(d.UpdateDate), new { @class="update-date", title = d.UpdateDate })).Named("Updated On");
column.For(a => Html.ActionLink("View", "Details", new { id = a.ID }, new { @class = "view-details" }));
column.For(a => Html.ActionLink("Edit", "Edit", new { id = a.ID }));
column.For(a => a.IsEnabled
? Html.ActionLink("Disable", "Disable", new { id = a.ID }, new { @class = "enable-disable-action" })
: Html.ActionLink("Enable", "Enable", new { id = a.ID }, new { @class = "enable-disable-action" }));
column.For(d => Html.ActionLink("Delete", "Delete", new { id = d.ID }, new { @class = "toolbar-button delete-action" }));
})%>
<table class="grid ui-widget ui-widget-content">
<thead class="ui-widget-header">
<tr>
<th>Domain ID</th>
<th>Email Address</th>
<th>Display Name</th>
<th>Status</th>
<th>Created On</th>
<th>Updated On</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<% foreach (var a in Model) { %>
<tr>
<td><%= a.DomainID %></td>
<td><%= a.EmailAddress %></td>
<td><%= a.DisplayName %></td>
<td class="status"><%= a.Status %></td>
<td><%= Html.Span(Formatter.Format(a.CreateDate), new { title = a.CreateDate }) %></td>
<td><%= Html.Span(Formatter.Format(a.UpdateDate), new { @class = "update-date", title = a.UpdateDate }) %></td>
<td>
<%= Html.ActionLink("View", "Details", new { id = a.ID }, new { @class = "view-details" }) %> |
<%= Html.ActionLink("Edit", "Edit", new { id = a.ID }) %> |
<% if (a.IsEnabled) { %>
<%= Html.ActionLink("Disable", "Disable", new { id = a.ID }, new { @class = "enable-disable-action" }) %>
<% } else { %>
<%= Html.ActionLink("Enable", "Enable", new { id = a.ID }, new { @class = "enable-disable-action" }) %>
<% } %>
|
<%= Html.ActionLink("Delete", "Delete", new { id = a.ID }, new { @class = "toolbar-button delete-action" }) %>
</td>
</tr>
<% } %>
</tbody>
</table>

<%= Html.Pager((IPagination)Model) %>
<% var paged = Model as Health.Direct.Admin.Console.Models.Pagination.PaginatedList<AddressModel>; %>
<% if (paged != null) { %>
<div class="pager">
<% if (paged.HasPreviousPage) { %>
<%= Html.ActionLink("Prev", ViewContext.RouteData.Values["action"].ToString(), new { page = paged.PageNumber - 1 }) %>
<% } %>
<span>Page <%= paged.PageNumber %> of <%= paged.PageCount %></span>
<% if (paged.HasNextPage) { %>
<%= Html.ActionLink("Next", ViewContext.RouteData.Values["action"].ToString(), new { page = paged.PageNumber + 1 }) %>
<% } %>
</div>
<% } %>

<div id="confirm-dialog" style="display: none;"></div>

Expand Down
3 changes: 0 additions & 3 deletions csharp/admin/AdminMvc/Views/Addresses/Index.aspx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<AddressModel>>" %>
<%@ Import Namespace="Health.Direct.Admin.Console.Models"%>
<%@ Import Namespace="MvcContrib.UI.Pager"%>
<%@ Import Namespace="MvcContrib.Pagination"%>
<%@ Import Namespace="MvcContrib.UI.Grid"%>
<%@ Import Namespace="Health.Direct.Admin.Console.Controllers"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Expand Down
Loading