Skip to content

Commit

Permalink
refactor(admin): remove admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxin688 committed Jul 12, 2024
1 parent 5f17a3a commit 1ff1d86
Show file tree
Hide file tree
Showing 40 changed files with 118 additions and 2,040 deletions.
1,373 changes: 0 additions & 1,373 deletions backend/alembic/versions/2024_07_09_2121-aedfbb298f93_init_db.py

This file was deleted.

10 changes: 5 additions & 5 deletions backend/deploy/collections/metadata/circuit_type.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
[
{
"id": 1,
"name": {"en_US": "Ponit-to-point", "zh_CN": "点对点专线"},
"name": {"en": "Ponit-to-point", "zh": "点对点专线"},
"slug": "p2p",
"description": "Point to point circuit/点对点专线",
"connection_type": "LAN"
},
{
"id": 2,
"name": {"en_US": "Internet", "zh_CN": "互联网专线"},
"name": {"en": "Internet", "zh": "互联网专线"},
"slug": "internet",
"description": "Internet circuit with dedicated public IP addresses/互联网专线(带公网IP地址)",
"connection_type": "WAN"
},
{
"id": 3,
"name": {"en_US": "MPLS", "zh_CN": "MPLS"},
"name": {"en": "MPLS", "zh": "MPLS"},
"slug": "mpls",
"description": "MPLS",
"connection_type": "WAN"
},
{
"id": 4,
"name": {"en_US": "Dark Fiber", "zh_CN": "裸光专线"},
"name": {"en": "Dark Fiber", "zh": "裸光专线"},
"slug": "dark-fiber",
"description": "大带宽同城裸光专线(通常距离较短的大带宽同城裸光专线)",
"connection_type": "WAN"
},
{
"id": 5,
"name": {"en_US": "ADSL", "zh_CN": "ADSL线路"},
"name": {"en": "ADSL", "zh": "ADSL线路"},
"slug": "adsl",
"description": "Intenet access with dynamic public IP addresses /ADSL互联网接入线路(无固定的公网地址)",
"connection_type": "WAN"
Expand Down
20 changes: 10 additions & 10 deletions backend/deploy/collections/metadata/device_role.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
[
{
"name": {"en_US": "Core Switch", "zh_CN": "核心交换机"},
"name": {"en": "Core Switch", "zh": "核心交换机"},
"slug": "core-switch",
"description": "",
"abbreviation": "CSW",
"priority": 100
},
{
"name": {"en_US": "Distribution Switch", "zh_CN": "汇聚交换机"},
"name": {"en": "Distribution Switch", "zh": "汇聚交换机"},
"slug": "distribution-switch",
"description": "",
"abbreviation": "DSW",
"priority": 200
},
{
"name": {"en_US": "Access Switch", "zh_CN": "接入交换机"},
"name": {"en": "Access Switch", "zh": "接入交换机"},
"slug": "access-switch",
"description": "",
"abbreviation": "ASW",
"priority": 300
},
{
"name": {"en_US": "Leaf Switch", "zh_CN": "leaf交换机"},
"name": {"en": "Leaf Switch", "zh": "leaf交换机"},
"slug": "leaf",
"description": "",
"abbreviation": "LEAF",
"priority": 300
},
{
"name": {"en_US": "Spine Switch", "zh_CN": "Spine交换机"},
"name": {"en": "Spine Switch", "zh": "Spine交换机"},
"slug": "spine",
"description": "",
"abbreviation": "SPINE",
"priority": 100
},
{
"name": {"en_US": "Border Leaf Switch", "zh_CN": "边缘leaf交换机"},
"name": {"en": "Border Leaf Switch", "zh": "边缘leaf交换机"},
"slug": "border-leaf",
"description": "",
"abbreviation": "BLEAF",
"priority": 200
},
{
"name": {"en_US": "Firewall", "zh_CN": "防火墙"},
"name": {"en": "Firewall", "zh": "防火墙"},
"slug": "firewall",
"description": "",
"abbreviation": "FW",
"priority": 50
},
{
"name": {"en_US": "Gateway Router", "zh_CN": "网关路由器"},
"name": {"en": "Gateway Router", "zh": "网关路由器"},
"slug": "gateway-router",
"description": "",
"abbreviation": "GR",
"priority": 30
},
{
"name": {"en_US": "Access Point", "zh_CN": "无线AP"},
"name": {"en": "Access Point", "zh": "无线AP"},
"slug": "access-point",
"description": "",
"abbreviation": "AP",
"priority": 400

},
{
"name": {"en_US": "WLAN Controller", "zh_CN": "无线控制器"},
"name": {"en": "WLAN Controller", "zh": "无线控制器"},
"slug": "wlan-ac",
"description": "",
"abbreviation": "WLC",
Expand Down
18 changes: 9 additions & 9 deletions backend/deploy/collections/metadata/ip_role.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
[
{
"name": {"en_US": "Wireless", "zh_CN": "无线"},
"name": {"en": "Wireless", "zh": "无线"},
"slug": "wireless",
"description": "wireless mixed access"
},
{
"name": {"en_US": "Wireless Empolyee", "zh_CN": "员工无线"},
"name": {"en": "Wireless Empolyee", "zh": "员工无线"},
"slug": "wireless-employee",
"description": "wireless employee access"
},
{
"name": {"en_US": "Wireless Guest", "zh_CN": "访客无线"},
"name": {"en": "Wireless Guest", "zh": "访客无线"},
"slug": "wireless-guest",
"description": "wireless guest access"
},
{
"name": {"en_US": "Wireless Iot", "zh_CN": "物联网无线"},
"name": {"en": "Wireless Iot", "zh": "物联网无线"},
"slug": "wireless-iot",
"description": "wireless iot access"
},
{
"name": {"en_US": "Wired User", "zh_CN": "有线用户"},
"name": {"en": "Wired User", "zh": "有线用户"},
"slug": "wired-user",
"description": "wired user access"
},
{
"name": {"en_US": "Printer", "zh_CN": "打印机"},
"name": {"en": "Printer", "zh": "打印机"},
"slug": "printer",
"description": "printer access"
},
{
"name": {"en_US": "Video Conference", "zh_CN": "视频会议"},
"name": {"en": "Video Conference", "zh": "视频会议"},
"slug": "video-conference",
"description": "video-conference"
},
{
"name": {"en_US": "Server Farm", "zh_CN": "服务器"},
"name": {"en": "Server Farm", "zh": "服务器"},
"slug": "server-farm",
"description": "server farm access"
},
{
"name": {"en_US": "Testing", "zh_CN": "测试"},
"name": {"en": "Testing", "zh": "测试"},
"slug": "testing",
"description": "tesings network access"
}
Expand Down
20 changes: 10 additions & 10 deletions backend/deploy/collections/metadata/manufacturer.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
[
{
"id": 1,
"name": {"en_US": "Cisco Systems", "zh_CN": "思科"},
"name": {"en": "Cisco Systems", "zh": "思科"},
"slug": "cisco"
},
{
"id": 2,
"name": {"en_US": "Juniper Networks", "zh_CN": "瞻博网络"},
"name": {"en": "Juniper Networks", "zh": "瞻博网络"},
"slug": "juniper"
},
{
"id": 3,
"name": {"en_US": "PlatAlto Networks", "zh_CN": "PlatAlto 网络"},
"name": {"en": "PlatAlto Networks", "zh": "PlatAlto 网络"},
"slug": "platalto"
},
{
"id": 4,
"name": {"en_US": "Arista Networks", "zh_CN": "Arista 网络"},
"name": {"en": "Arista Networks", "zh": "Arista 网络"},
"slug": "arista"
},
{
"id": 5,
"name": {"en_US": "HPE", "zh_CN": "HPE"},
"name": {"en": "HPE", "zh": "HPE"},
"slug": "hpe"
},
{
"id": 6,
"name": {"en_US": "VMware", "zh_CN": "VMware"},
"name": {"en": "VMware", "zh": "VMware"},
"slug": "vmware"
},
{
"id": 7,
"name": {"en_US": "H3C", "zh_CN": "新华三"},
"name": {"en": "H3C", "zh": "新华三"},
"slug": "h3c"
},
{
"id": 8,
"name": {"en_US": "Huawei", "zh_CN": "华为"},
"name": {"en": "Huawei", "zh": "华为"},
"slug": "huawei"
},
{
"id": 9,
"name": {"en_US": "Ruijie Networks", "zh_CN": "锐捷网络"},
"name": {"en": "Ruijie Networks", "zh": "锐捷网络"},
"slug": "ruijie"
},
{
"id": 10,
"name": {"en_US": "FORTINET", "zh_CN": "飞塔"},
"name": {"en": "FORTINET", "zh": "飞塔"},
"slug": "fortinet"
}
]
16 changes: 8 additions & 8 deletions backend/deploy/collections/metadata/rack_role.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
[
{
"id": 1,
"name": {"en_US": "Server Rack", "zh_CN": "服务器机柜"},
"name": {"en": "Server Rack", "zh": "服务器机柜"},
"slug": "server",
"description": "用于托管各种服务器,包括应用服务器、数据库服务器等,该机柜可能包括冗余电源单元、网络交换机等。\nUsed to host various servers, including application servers, database servers, etc. This cabinet may include redundant power units, network switches, etc."
},
{
"id": 2,
"name": {"en_US": "Network Equipment Rack", "zh_CN": "网络设备机柜"},
"name": {"en": "Network Equipment Rack", "zh": "网络设备机柜"},
"slug": "network",
"description": "专门用于存放网络设备,如交换机、路由器、防火墙等,集中管理和维护网络基础设施。\nSpecifically designed to house network devices such as switches, routers, firewalls, etc for centralize the management and maintenance of network infrastructure."
},
{
"id": 3,
"name": {"en_US": "Storage Rack", "zh_CN": "存储机柜"},
"name": {"en": "Storage Rack", "zh": "存储机柜"},
"slug": "storage",
"description": "用于托管各种存储设备,如磁盘阵列、存储服务器、网络附加存储等,支持高容量和高性能存储需求。\nUsed to host various storage devices, including disk arrays, storage servers, network-attached storage, etc. Designed to support high-capacity and high-performance storage requirements."
},
{
"id": 4,
"name": {"en_US": "Management and Monitoring Rack", "zh_CN": "管理监控机柜"},
"name": {"en": "Management and Monitoring Rack", "zh": "管理监控机柜"},
"slug": "management",
"description": "包含用于监控和管理数据中心设备的设备,如监控系统、远程管理设备等。实时监测和响应设备状态。\nAcommodates power units and air conditioning equipment, ensuring stable power supply and suitable environmental conditions for data center equipment."
},
{
"id": 5,
"name": {"en_US": "Auxiliary Equipment Rack", "zh_CN": "辅助设备机柜"},
"name": {"en": "Auxiliary Equipment Rack", "zh": "辅助设备机柜"},
"slug": "auxiliary",
"description": "包括备用设备、配线架、电缆管理等辅助设备。\nIncludes backup equipment, patch panels, cable management, etc. for auxiliary equipment."
},
{
"id": 6,
"name": {"en_US": "Security Equipment Rack", "zh_CN": "安全设备机柜"},
"name": {"en": "Security Equipment Rack", "zh": "安全设备机柜"},
"slug": "security",
"description": "存放安全设备,如防火墙、入侵检测,DDos系统等保护数据中心免受网络攻击和潜在威胁。\nHouses security devices such as firewalls, intrusion detection systems, DDoS systems, etc, to protect the data center from network attacks and potential threats."
},
{
"id": 7,
"name": {"en_US": "Application-Specific Rack", "zh_CN": "应用机柜"},
"name": {"en": "Application-Specific Rack", "zh": "应用机柜"},
"slug": "application",
"description": "GPU加速,高速网络,RDMA等特定计算任务机柜\n host equipment for specific applications or workloads, such as GPU-accelerated computing, high-speed networking, RDMA, etc."
},
{
"id": 8,
"name": {"en_US": "Testing Rack", "zh_CN": "测试机柜"},
"name": {"en": "Testing Rack", "zh": "测试机柜"},
"slug": "testing",
"description": "专门为测试和开发环境提供的机柜,用于容纳测试服务器、开发服务器等。\nSpecifically designed for testing and development environments, housing servers dedicated to testing and development purposes."
}
Expand Down
4 changes: 0 additions & 4 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ dependencies = [
"redis>=5.0.1",
"sentry_sdk>=1.39.2",
"httpx>=0.26.0",
"pydantic_extra_types>=2.4.1",
"phonenumbers>=8.13.27",
"asyncpg>=0.29.0",
"sqlalchemy-utils>=0.41.1",
"python-multipart>=0.0.6",
Expand All @@ -31,8 +29,6 @@ dependencies = [
"icmplib>=3.0.4",
"tcppinglib>=2.0.3",
"netmiko>=4.3.0",
"sqladmin>=0.18.0",
"itsdangerous>=2.2.0",
]
readme = "README.md"
requires-python = ">= 3.11"
Expand Down
16 changes: 0 additions & 16 deletions backend/requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,8 @@ idna==3.6
# via httpx
iniconfig==2.0.0
# via pytest
itsdangerous==2.2.0
# via netsight
jinja2==3.1.4
# via fastapi
# via sqladmin
kombu==5.3.7
# via celery
mako==1.3.0
Expand All @@ -111,7 +108,6 @@ markdown-it-py==3.0.0
markupsafe==2.1.3
# via jinja2
# via mako
# via wtforms
mdurl==0.1.2
# via markdown-it-py
mypy==1.8.0
Expand Down Expand Up @@ -143,8 +139,6 @@ passlib==1.7.4
# via netsight
pathspec==0.12.1
# via black
phonenumbers==8.13.27
# via netsight
platformdirs==4.1.0
# via black
# via virtualenv
Expand All @@ -158,12 +152,9 @@ pycparser==2.22
# via cffi
pydantic==2.5.3
# via fastapi
# via pydantic-extra-types
# via pydantic-settings
pydantic-core==2.14.6
# via pydantic
pydantic-extra-types==2.4.1
# via netsight
pydantic-settings==2.1.0
# via netsight
pygments==2.18.0
Expand Down Expand Up @@ -193,7 +184,6 @@ python-dotenv==1.0.0
python-multipart==0.0.9
# via fastapi
# via netsight
# via sqladmin
pytz==2024.1
# via pandas
pyyaml==6.0.1
Expand All @@ -219,18 +209,14 @@ six==1.16.0
sniffio==1.3.0
# via anyio
# via httpx
sqladmin==0.18.0
# via netsight
sqlalchemy==2.0.31
# via alembic
# via netsight
# via sqladmin
# via sqlalchemy-utils
sqlalchemy-utils==0.41.1
# via netsight
starlette==0.37.2
# via fastapi
# via sqladmin
tcppinglib==2.0.3
# via netsight
termcolor==2.4.0
Expand Down Expand Up @@ -273,5 +259,3 @@ wcwidth==0.2.13
# via prompt-toolkit
websockets==12.0
# via uvicorn
wtforms==3.1.2
# via sqladmin
Loading

0 comments on commit 1ff1d86

Please sign in to comment.