This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class TestController : ControllerBase
|
||||
{
|
||||
[HttpGet]
|
||||
[Produces("text/html")]
|
||||
public ContentResult GetSchema()
|
||||
{
|
||||
var html = @"
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>Схема подключения</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 40px;
|
||||
background: #f0f2f5;
|
||||
}
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
background: white;
|
||||
padding: 30px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
||||
}
|
||||
h1 {
|
||||
color: #2c3e50;
|
||||
border-bottom: 3px solid #3498db;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.node {
|
||||
background: #3498db;
|
||||
color: white;
|
||||
padding: 15px;
|
||||
margin: 10px;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='container'>
|
||||
<h1>Схема подключения устройства</h1>
|
||||
<p>Эта страница возвращается из Web API контроллера</p>
|
||||
|
||||
<div style='text-align: center; margin: 30px 0;'>
|
||||
<div class='node'>Маршрутизатор</div>
|
||||
<div style='margin: 20px;'>↓</div>
|
||||
<div class='node'>Коммутатор</div>
|
||||
<div style='margin: 20px; display: flex; justify-content: space-around;'>
|
||||
<div>
|
||||
<div class='node'>Сервер</div>
|
||||
<div class='node'>Компьютер 1</div>
|
||||
<div class='node'>Компьютер 2</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p><strong>Время генерации:</strong> " + DateTime.Now.ToString("HH:mm:ss") + @"</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
return Content(html, "text/html; charset=utf-8");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Net;
|
||||
using System.Net.Http.Headers;
|
||||
|
||||
namespace Wiking.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class WeatherForecastController : ControllerBase
|
||||
{
|
||||
private static readonly string[] Summaries = new[]
|
||||
{
|
||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
private readonly ILogger<WeatherForecastController> _logger;
|
||||
|
||||
public WeatherForecastController(ILogger<WeatherForecastController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
[HttpGet(Name = "GetWeatherForecast")]
|
||||
public IEnumerable<WeatherForecast> Get()
|
||||
{
|
||||
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("api/schema")]
|
||||
public HttpResponseMessage GetHtmlPage()
|
||||
{
|
||||
var htmlContent = @"<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Ñõåìà ïîäêëþ÷åíèÿ</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 40px; }
|
||||
h1 { color: #333; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ñõåìà ïîäêëþ÷åíèÿ óñòðîéñòâà</h1>
|
||||
<p>Ýòî HTML ñòðàíèöà, âîçâðàùàåìàÿ èç WebApi êîíòðîëëåðà</p>
|
||||
<div>Çäåñü ìîæåò áûòü âàøà ñõåìà ïîäêëþ÷åíèÿ</div>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
var response = new HttpResponseMessage(HttpStatusCode.OK);
|
||||
response.Content = new StringContent(htmlContent);
|
||||
response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html");
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
namespace Wiking
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:60191",
|
||||
"sslPort": 44339
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://192.168.1.228:5292",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://192.168.1.228:7189;http://192.168.1.228:5292",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Wiking
|
||||
{
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string? Summary { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="htmlpage.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
@Wiking_HostAddress = http://localhost:5292
|
||||
|
||||
GET {{Wiking_HostAddress}}/weatherforecast/
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
@@ -0,0 +1,475 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Схема подключения устройства</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
||||
min-height: 100vh;
|
||||
padding: 20px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
header {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
padding: 20px;
|
||||
background-color: white;
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #2c3e50;
|
||||
margin-bottom: 10px;
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
color: #7f8c8d;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 30px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.diagram-container {
|
||||
flex: 1;
|
||||
min-width: 300px;
|
||||
background-color: white;
|
||||
border-radius: 15px;
|
||||
padding: 25px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.instructions {
|
||||
flex: 1;
|
||||
min-width: 300px;
|
||||
background-color: white;
|
||||
border-radius: 15px;
|
||||
padding: 25px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
color: #2c3e50;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 2px solid #3498db;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.section-title i {
|
||||
color: #3498db;
|
||||
}
|
||||
|
||||
.diagram {
|
||||
position: relative;
|
||||
height: 400px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 10px;
|
||||
border: 2px dashed #ddd;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.device {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.device:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.device i {
|
||||
font-size: 30px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.device-name {
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.device-1 {
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
border-top: 4px solid #e74c3c;
|
||||
}
|
||||
|
||||
.device-2 {
|
||||
top: 50px;
|
||||
right: 50px;
|
||||
border-top: 4px solid #3498db;
|
||||
}
|
||||
|
||||
.device-3 {
|
||||
bottom: 50px;
|
||||
left: 50px;
|
||||
border-top: 4px solid #2ecc71;
|
||||
}
|
||||
|
||||
.device-4 {
|
||||
bottom: 50px;
|
||||
right: 50px;
|
||||
border-top: 4px solid #f39c12;
|
||||
}
|
||||
|
||||
.device-5 {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border-top: 4px solid #9b59b6;
|
||||
}
|
||||
|
||||
.connection {
|
||||
position: absolute;
|
||||
height: 4px;
|
||||
background-color: #3498db;
|
||||
z-index: 1;
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
.connection-1 {
|
||||
width: 120px;
|
||||
top: 100px;
|
||||
left: 160px;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.connection-2 {
|
||||
width: 120px;
|
||||
top: 100px;
|
||||
right: 160px;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.connection-3 {
|
||||
width: 120px;
|
||||
bottom: 100px;
|
||||
left: 160px;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.connection-4 {
|
||||
width: 120px;
|
||||
bottom: 100px;
|
||||
right: 160px;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.steps {
|
||||
list-style-type: none;
|
||||
counter-reset: step-counter;
|
||||
}
|
||||
|
||||
.step {
|
||||
margin-bottom: 20px;
|
||||
padding-left: 40px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.step:before {
|
||||
counter-increment: step-counter;
|
||||
content: counter(step-counter);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background-color: #3498db;
|
||||
color: white;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.step h3 {
|
||||
color: #2c3e50;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.step p {
|
||||
color: #555;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.details {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.detail-box {
|
||||
flex: 1;
|
||||
min-width: 250px;
|
||||
background-color: white;
|
||||
border-radius: 15px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.detail-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
font-weight: 600;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
color: #3498db;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
footer {
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
padding: 20px;
|
||||
color: #7f8c8d;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
background-color: #e8f4fc;
|
||||
padding: 3px 6px;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.content {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.device {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.device-5 {
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.device i {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.device-name {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.connection {
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
.connection-1, .connection-2, .connection-3, .connection-4 {
|
||||
width: 80px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1>Схема подключения устройства</h1>
|
||||
<p class="subtitle">Интерактивная схема подключения сетевого оборудования</p>
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
<div class="diagram-container">
|
||||
<h2 class="section-title"><i class="fas fa-project-diagram"></i> Схема подключения</h2>
|
||||
<div class="diagram">
|
||||
<!-- Подключения -->
|
||||
<div class="connection connection-1"></div>
|
||||
<div class="connection connection-2"></div>
|
||||
<div class="connection connection-3"></div>
|
||||
<div class="connection connection-4"></div>
|
||||
|
||||
<!-- Устройства -->
|
||||
<div class="device device-1" data-device="router">
|
||||
<i class="fas fa-wifi"></i>
|
||||
<span class="device-name">Маршрутизатор</span>
|
||||
</div>
|
||||
|
||||
<div class="device device-2" data-device="switch">
|
||||
<i class="fas fa-network-wired"></i>
|
||||
<span class="device-name">Сетевой коммутатор</span>
|
||||
</div>
|
||||
|
||||
<div class="device device-3" data-device="pc">
|
||||
<i class="fas fa-desktop"></i>
|
||||
<span class="device-name">Рабочая станция</span>
|
||||
</div>
|
||||
|
||||
<div class="device device-4" data-device="server">
|
||||
<i class="fas fa-server"></i>
|
||||
<span class="device-name">Сервер</span>
|
||||
</div>
|
||||
|
||||
<div class="device device-5" data-device="main">
|
||||
<i class="fas fa-hdd"></i>
|
||||
<span class="device-name">Основное устройство</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="instructions">
|
||||
<h2 class="section-title"><i class="fas fa-list-ol"></i> Инструкция по подключению</h2>
|
||||
<ol class="steps">
|
||||
<li class="step">
|
||||
<h3>Подготовка оборудования</h3>
|
||||
<p>Убедитесь, что все устройства выключены. Проверьте наличие всех необходимых кабелей и аксессуаров.</p>
|
||||
</li>
|
||||
<li class="step">
|
||||
<h3>Подключение маршрутизатора</h3>
|
||||
<p>Соедините WAN-порт маршрутизатора с кабелем интернет-провайдера. Подключите блок питания к маршрутизатору.</p>
|
||||
</li>
|
||||
<li class="step">
|
||||
<h3>Подключение коммутатора</h3>
|
||||
<p>Соедините LAN-порт маршрутизатора с любым портом сетевого коммутатора с помощью <span class="highlight">патч-корда</span>.</p>
|
||||
</li>
|
||||
<li class="step">
|
||||
<h3>Подключение устройств</h3>
|
||||
<p>Подключите рабочую станцию, сервер и основное устройство к свободным портам коммутатора.</p>
|
||||
</li>
|
||||
<li class="step">
|
||||
<h3>Настройка и проверка</h3>
|
||||
<p>Включите все устройства. Проверьте индикацию на каждом устройстве и убедитесь в наличии сетевого соединения.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="details">
|
||||
<div class="detail-box">
|
||||
<h2 class="section-title"><i class="fas fa-info-circle"></i> Технические характеристики</h2>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Тип подключения:</span>
|
||||
<span class="detail-value">Ethernet 1000BASE-T</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Скорость передачи:</span>
|
||||
<span class="detail-value">до 1 Гбит/с</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Тип кабеля:</span>
|
||||
<span class="detail-value">CAT 5e/6/6a</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Макс. длина кабеля:</span>
|
||||
<span class="detail-value">100 метров</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Протоколы:</span>
|
||||
<span class="detail-value">TCP/IP, DHCP, DNS</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail-box">
|
||||
<h2 class="section-title"><i class="fas fa-tools"></i> Необходимые компоненты</h2>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Маршрутизатор:</span>
|
||||
<span class="detail-value">1 шт.</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Сетевой коммутатор:</span>
|
||||
<span class="detail-value">1 шт. (8 портов)</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Патч-корды:</span>
|
||||
<span class="detail-value">4 шт.</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Сетевые карты:</span>
|
||||
<span class="detail-value">встроенные</span>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<span class="detail-label">Блоки питания:</span>
|
||||
<span class="detail-value">4 шт.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<p>Схема подключения устройства | Создано для наглядного представления сетевой инфраструктуры</p>
|
||||
<p>© 2023 Все права защищены. При использовании схемы убедитесь в соответствии техническим требованиям.</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Добавляем интерактивность для устройств
|
||||
document.querySelectorAll('.device').forEach(device => {
|
||||
device.addEventListener('click', function() {
|
||||
const deviceName = this.querySelector('.device-name').textContent;
|
||||
alert(`Вы выбрали: ${deviceName}\n\nЭто устройство подключено к основному устройству через сетевой коммутатор.`);
|
||||
});
|
||||
});
|
||||
|
||||
// Анимация подключений при загрузке страницы
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const connections = document.querySelectorAll('.connection');
|
||||
connections.forEach((conn, index) => {
|
||||
// Начальное состояние - линии невидимы
|
||||
conn.style.width = '0';
|
||||
|
||||
// Анимация появления линий с задержкой
|
||||
setTimeout(() => {
|
||||
conn.style.transition = 'width 1s ease-in-out';
|
||||
if (index === 0) conn.style.width = '120px';
|
||||
if (index === 1) conn.style.width = '120px';
|
||||
if (index === 2) conn.style.width = '120px';
|
||||
if (index === 3) conn.style.width = '120px';
|
||||
}, 300 + index * 300);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user