HOW TO make default GUI page

The guide explains how to make own default HCP page. In this case, VPS manager page is set as default one. For setting another one change instructions accordingly


1. Changing C:\Program Files (x86)\Atomia\HostingControlPanel\AppData\appConfig.config file on GUI box

Since all changes should be done through transformation files, the bellow transformation file put in an appropriate folder and start C:\Program Files (x86)\Atomia\HostingControlPanel\Recreate config files,
as per http://support.atomia.com/solution/articles/4000010876-atomia-configuration-files-and-transformations guide.

AppConfig.MyTransformation.config file:

    
<?xml version="1.0" encoding="utf-8"?>
    <appConfig xmlns="Atomia.Web.Base.Configs"  xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <routing>
	<routeAreasList>
	    <routeAreas name="VPS" order="22" xdt:Locator="Match(name)" xdt:Transform="SetAttributes(order)">
					<route name="" url="{language}-{culture}/{accountID}" id="7031213123" controllerNamespace="Atomia.Web.Plugin.VPS.Controllers" xdt:Transform="Insert"> 
						<routeDefaultsList>
							<routeDefault name="controller" value="Manager" /> 
							<routeDefault name="action" value="Index" /> 
						</routeDefaultsList> 
					</route> 
					<route name="" url="{language}-{culture}-{cultureaddon}/{accountID}" id="6241511123" controllerNamespace="Atomia.Web.Plugin.VPS.Controllers" xdt:Transform="Insert"> 
						<routeDefaultsList>
							<routeDefault name="controller" value="Manager" /> 
							<routeDefault name="action" value="Index" /> 
						</routeDefaultsList> 
					</route> 
					<route name="" url="{accountID}" id="1352727123" controllerNamespace="Atomia.Web.Plugin.VPS.Controllers" xdt:Transform="Insert">
						<routeDefaultsList> 
							<routeDefault name="controller" value="Manager" />
							<routeDefault name="action" value="Index" /> 
						</routeDefaultsList> 
					</route>
				</routeAreas>
				<routeAreas name="Dashboard" order="17">
					<route name="" url="{language}-{culture}/{accountID}/Dashboard" id="7031213"  controllerNamespace="Atomia.Web.Plugin.Dashboard.Controllers" xdt:Transform="SetAttributes(url)" xdt:Locator="Match(id)">
						<routeDefaultsList> 
							<routeDefault name="controller" value="Dashboard" />
							<routeDefault name="action" value="Index" /> 
						</routeDefaultsList> 
					</route>
					<route name="" url="{language}-{culture}-{cultureaddon}/{accountID}/Dashboard" id="6241511" controllerNamespace="Atomia.Web.Plugin.Dashboard.Controllers" xdt:Transform="SetAttributes(url)" xdt:Locator="Match(id)">
						<routeDefaultsList> 
							<routeDefault name="controller" value="Dashboard" />
							<routeDefault name="action" value="Index" /> 
						</routeDefaultsList> 
					</route>
					<route name="" url="{accountID}/Dashboard" id="1352727" controllerNamespace="Atomia.Web.Plugin.Dashboard.Controllers" xdt:Transform="SetAttributes(url)" xdt:Locator="Match(id)">
						<routeDefaultsList> 
							<routeDefault name="controller" value="Dashboard" />
							<routeDefault name="action" value="Index" /> 
						</routeDefaultsList> 
					</route>
				</routeAreas>
				<routeAreas name="root" order="23" xdt:Locator="Match(name)" xdt:Transform="SetAttributes(order)">
				</routeAreas>
			</routeAreasList>
		</routing>
    </appConfig> 

    


Remark:

If the user should be redirected to VPS manager after setting password on landing page, the view Themes\Default\Views\Accounts\Account\Landing.aspx needs to be copied to the custom theme and the entryPointUrl variable (whole line) changed to the snippet:

 

<%
    Atomia.Web.Plugin.HCP.Provisioning.Helpers.AccountData accountData = null;
    if (this.Url.RequestContext.HttpContext.User.Identity.IsAuthenticated)
    {
        HttpSessionStateBase sessionBase = new HttpSessionStateWrapper(this.Session);
        accountData = new Atomia.Web.Plugin.HCP.Provisioning.Helpers.AccountData(sessionBase, this.Url.RequestContext.RouteData, this.Url.RequestContext.HttpContext.User.Identity.Name, true);
    }
%>
entryPointUrl = '<%= Url.Action("Index", new { area = "VPS", controller = "Manager", accountID = accountData.LoggedUserDetails.Number }) %>';

 


2. Copy the following file Loader.aspx to {customtheme}\Views\Accounts\Account\

It is a customization of our account loader screen, with the progress bar animation removed.

 

<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="Atomia.Web.Frame.Controllers"%>
<%@ Import Namespace="System.Web.Mvc" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    <%= Html.Resource("Title")%>
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">		
		$("#header, #header_settings, #footer").remove();
		$(".container").css("width","auto");
		$("body").css("background","none");
		
		$(document).ready(function() {
			$(".container").css("width","auto");
			$("body").css("background","none");
			window.location.href = '<%= Url.Action("Index", new { area = "VPS", controller = "Manager", accountID = ViewData["accountID"].ToString() }) %>';
        });
    </script>
</asp:Content>

 

3. Make a transformation for changing C:\Program Files (x86)\Atomia\HostingControlPanel\bin\Atomia.Web.Plugin.Accounts.dll.config

 

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
   <appConfig xmlns="Atomia.Web.Base.Configs">
	<pluginSettingsList>
      <pluginSettingsPlugin pluginName="Accounts" xdt:Locator="Match(pluginName)">
	    <pluginSetting name="showLoadingScreen" value="true" xdt:Transform="SetAttributes(value)" xdt:Locator="Match(name)" />
      </pluginSettingsPlugin>
    </pluginSettingsList>
  </appConfig>
</configuration>