📄 Downtime.cshtml Documentation

File Path: IrbyImaging/Views/Home/Downtime.cshtml


📑 Table of Contents

  1. Overview & Purpose
  2. Dependencies & Technologies
  3. Key Functional Areas
  4. View Composition & Layout Integration
  5. Markup Breakdown
  6. Usage & Integration
  7. Sample Controller Action
  8. Error Handling & Return Types
  9. Third‑Party Integrations
  10. Sample UML Sequence Diagram
  11. Conclusion

🔍 Overview & Purpose

The Downtime.cshtml view serves as a maintenance/“under construction” page for the Irby Imaging web application. When scheduled maintenance or unexpected outages occur, users are redirected here to:

  • See a friendly maintenance illustration 🛠️
  • Understand why the site is down
  • Get an estimated downtime or next steps
  • Contact support if needed

This enhances user experience by providing clear, branded messaging rather than generic server errors.


🧰 Dependencies & Technologies

Dependency Purpose
ASP.NET MVC (Razor) View engine & layout management
Bootstrap 4/5 Responsive grid & components styling
Font Awesome Home icon (fas fa-home)
Boxicons (bx) Info-card icons (broadcast, time… )
jQuery DOM manipulation & plugin support
MetisMenu Side-menu support (from layout)
SimpleBar Custom scrollbars (from layout)
node-waves Ripple effects on clicks (layout)
~/js/app.js Core site scripts

🔑 Key Functional Areas

  1. Razor Declarations: Sets page title & layout
  2. Home Button: Quick return to homepage
  3. Maintenance Section:
    • Illustration
    • Heading & sub‑text
    • Three info cards (Why down, When up, Support)
  4. Script References: Ensures required JS plugins load

🏗️ View Composition & Layout Integration

@{
    ViewBag.Title = "Maintenance Page";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
  • ViewBag.Title influences <title> tag in the shared layout.
  • Layout points to the master template (_Layout.cshtml) that wraps this view.

📝 Markup Breakdown

1. Title & Layout Declaration

@{ 
  ViewBag.Title = "Maintenance Page"; 
  Layout = "~/Views/Shared/_Layout.cshtml"; 
}
  • ViewBag.Title: Appears in browser tab.
  • Layout: Inherits header, footer, navigation styles from shared layout.

2. Home Navigation Button

<div class="home-btn d-none d-sm-block">
  <a href="@Url.Action("Index","Home")" class="text-dark">
    <i class="fas fa-home h2"></i>
  </a>
</div>
  • Responsive: Hidden on extra‑small screens (d-none d-sm-block).
  • Icon: Font Awesome home icon, sized via h2.
  • URL Generation: @Url.Action("Index","Home") ensures correct routing.

3. Maintenance Section

<section class="my-5 pt-sm-5">
  <div class="container">
    <!-- Content here -->
  </div>
</section>
  • Spacing: my-5 (vertical margin), pt-sm-5 (top padding on ≥sm devices).
  • Bootstrap Grid: Centers content & makes it responsive.

3.1. Illustration Image

<img src="~/images/maintenance.svg" alt="Under Maintenance" class="img-fluid mx-auto d-block">
  • img-fluid: Responsive scaling.
  • Centered: mx-auto d-block.

3.2. Heading & Message

<h3 class="mt-5">Site is Under Maintenance</h3>
<p>Please check back in sometime.</p>
  • Clear H3 headline.
  • Short supportive paragraph.

3.3. Info Cards

Three horizontally‑aligned cards explain:

Icon Title Description
<i class="bx bx-broadcast"> Why is the Site Down? The site is under construction or scheduled maintenance.
<i class="bx bx-time-five"> What is the Downtime? Please check back soon.
<i class="bx bx-envelope"> Do you need Support? Contact Irby IT: [email protected]

Card Markup Example:

<div class="card mt-4 maintenance-box">
  <div class="card-body text-center">
    <i class="bx bx-broadcast mb-4 h1 text-primary"></i>
    <h5 class="font-size-15 text-uppercase">Why is the Site Down?</h5>
    <p class="text-muted mb-0">
      The site is either under construction or scheduled maintenance
    </p>
  </div>
</div>

4. Script Inclusions

At end of body to improve page load:

<script src="~/libs/jquery/jquery.min.js"></script>
<script src="~/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="~/libs/metismenu/metisMenu.min.js"></script>
<script src="~/libs/simplebar/simplebar.min.js"></script>
<script src="~/libs/node-waves/waves.min.js"></script>
<script src="~/js/app.js"></script>
  • jQuery & Bootstrap: Core interactivity & components.
  • MetisMenu, SimpleBar, node‑waves: Layout utilities.
  • app.js: Custom site logic.

⚙️ Usage & Integration

  1. Place this file under Views/Home/Downtime.cshtml.
  2. Add an action to HomeController.cs:
    public ActionResult Downtime()
    {
        return View();
    }
    
  3. Route or redirect users to /Home/Downtime during maintenance windows.
  4. Optionally change copy, icons or email address as needed.

🔄 Sample Controller Action

namespace IrbyImaging.Controllers
{
    public class HomeController : Controller
    {
        // Other actions...

        /// <summary>
        /// Displays the maintenance page during planned downtime.
        /// </summary>
        public ActionResult Downtime()
        {
            return View(); // Renders Downtime.cshtml
        }
    }
}

🚨 Error Handling & Return Types

  • Return Type: ActionResult
  • Error Handling: Not applicable in view; any exceptions bubble up to ASP.NET MVC error pipeline or custom filters.

🔗 Third‑Party Integrations

  • Font Awesome: <i class="fas fa-home">
  • Boxicons: <i class="bx bx-...">
  • Bootstrap: Layout & responsive utilities
  • jQuery & Plugins: Interactive enhancements (via layout)

📈 Sample UML Sequence Diagram

@startuml
actor User
User -> HomeController : GET /Home/Downtime
HomeController -> ViewEngine : Render("Downtime.cshtml")
ViewEngine -> Layout : Apply Master Layout
ViewEngine --> User : HTML (Maintenance Page)
@enduml

🏁 Conclusion

The Downtime.cshtml view provides a user-friendly, responsive, and branded maintenance page for Irby Imaging. By leveraging ASP.NET MVC, Bootstrap, and third‑party icon libraries, it ensures clear communication during downtime events. Simply wire up a controller action and route users here when the site is unavailable, and you’ll deliver a polished experience instead of a generic error.

🚀 Ready to keep your users informed and your brand on point during maintenance? Use this view as a drop‑in solution!