{{define "asset_tabs"}}
{{end}} {{define "asset_tabs_end"}}
{{end}} {{define "assets"}} {{template "asset_tabs" .}} {{if eq .AssetTab "integrations"}}

{{icon "service"}}第三方服务列表

{{icon "apply"}}新增服务 {{if .AssetIntegration.Name}} {{icon "edit"}}编辑
{{end}}
{{range .AssetIntegrations}} {{else}} {{end}}
服务名称 服务类型 描述 地址摘要 状态 引用数量
{{.Name}} {{.TypeLabel}} {{if .Description}}{{.Description}}{{else}}-{{end}} {{if .AddressSummary}}{{.AddressSummary}}{{else}}-{{end}} {{if .Enabled}}启用{{else}}停用{{end}} {{.RefCount}}
还没有第三方服务
{{if .AssetIntegration}}

{{icon "service"}}{{if .AssetIntegrationEditing}}第三方服务编辑{{else}}第三方服务详情{{end}}{{if .AssetIntegration.Name}} · {{.AssetIntegration.Name}}{{end}}

{{if .AssetIntegrationEditing}} 编辑模式 当前第三方服务正在编辑,保存后生效。 {{else}} 查看模式 当前第三方服务为只读展示。 {{end}}
{{if .AssetIntegrationEditing}}
{{icon "close"}}取消
{{else}}
服务名称{{.AssetIntegration.Name}}
服务类型{{.AssetIntegration.TypeLabel}}
描述{{if .AssetIntegration.Description}}{{.AssetIntegration.Description}}{{else}}-{{end}}
启用状态{{if .AssetIntegration.Enabled}}启用{{else}}停用{{end}}
对象存储地址{{if and .AssetIntegration.ObjectStorage .AssetIntegration.ObjectStorage.Endpoint}}{{.AssetIntegration.ObjectStorage.Endpoint}}{{else}}-{{end}}
Bucket{{if and .AssetIntegration.ObjectStorage .AssetIntegration.ObjectStorage.Bucket}}{{.AssetIntegration.ObjectStorage.Bucket}}{{else}}-{{end}}
Access Key{{if and .AssetIntegration.ObjectStorage .AssetIntegration.ObjectStorage.AccessKey}}{{.AssetIntegration.ObjectStorage.AccessKey}}{{else}}-{{end}}
Secret Key{{if and .AssetIntegration.ObjectStorage .AssetIntegration.ObjectStorage.SecretKey}}{{.AssetIntegration.ObjectStorage.SecretKey}}{{else}}-{{end}}
Token 获取地址{{if and .AssetIntegration.TokenService .AssetIntegration.TokenService.GetTokenURL}}{{.AssetIntegration.TokenService.GetTokenURL}}{{else}}-{{end}}
认证用户名{{if and .AssetIntegration.TokenService .AssetIntegration.TokenService.Username}}{{.AssetIntegration.TokenService.Username}}{{else}}-{{end}}
认证租户编码{{if and .AssetIntegration.TokenService .AssetIntegration.TokenService.TenantCode}}{{.AssetIntegration.TokenService.TenantCode}}{{else}}-{{end}}
消息上报地址{{if and .AssetIntegration.AlarmService .AssetIntegration.AlarmService.PutMessageURL}}{{.AssetIntegration.AlarmService.PutMessageURL}}{{else}}-{{end}}
告警用户名{{if and .AssetIntegration.AlarmService .AssetIntegration.AlarmService.Username}}{{.AssetIntegration.AlarmService.Username}}{{else}}-{{end}}
告警租户编码{{if and .AssetIntegration.AlarmService .AssetIntegration.AlarmService.TenantCode}}{{.AssetIntegration.AlarmService.TenantCode}}{{else}}-{{end}}
{{end}}
{{end}} {{else if eq .AssetTab "video-sources"}}

{{icon "device"}}视频源列表

{{icon "apply"}}新增视频源 {{if .AssetVideoSource.Name}} {{icon "edit"}}编辑
{{end}}
{{range .AssetVideoSources}} {{else}} {{end}}
视频源名称 类型 区域 输入地址 分辨率 帧率 引用数量
{{.Name}} {{.SourceTypeLabel}} {{if .Area}}{{.Area}}{{else}}-{{end}} {{if .Config.URL}}{{.Config.URL}}{{else}}-{{end}} {{if .Config.Resolution}}{{.Config.Resolution}}{{else}}-{{end}} {{if .Config.FPS}}{{.Config.FPS}}{{else}}-{{end}} {{.RefCount}}
还没有视频源
{{if .AssetVideoSource}}

{{icon "device"}}{{if .AssetVideoSourceEditing}}视频源编辑{{else}}视频源详情{{end}}{{if .AssetVideoSource.Name}} · {{.AssetVideoSource.Name}}{{end}}

{{if .AssetVideoSourceEditing}} 编辑模式 当前视频源正在编辑,保存后生效。 {{else}} 查看模式 当前视频源为只读展示。 {{end}}
{{if .AssetVideoSourceEditing}}
{{icon "close"}}取消
{{else}}
视频源名称{{.AssetVideoSource.Name}}
类型{{.AssetVideoSource.SourceTypeLabel}}
区域{{if .AssetVideoSource.Area}}{{.AssetVideoSource.Area}}{{else}}-{{end}}
描述{{if .AssetVideoSource.Description}}{{.AssetVideoSource.Description}}{{else}}-{{end}}
输入地址{{if .AssetVideoSource.Config.URL}}{{.AssetVideoSource.Config.URL}}{{else}}-{{end}}
标准分辨率{{if .AssetVideoSource.Config.Resolution}}{{.AssetVideoSource.Config.Resolution}}{{else}}-{{end}}
像素尺寸{{if .AssetVideoSource.Config.FrameSize}}{{.AssetVideoSource.Config.FrameSize}}{{else}}-{{end}}
帧率{{if .AssetVideoSource.Config.FPS}}{{.AssetVideoSource.Config.FPS}}{{else}}-{{end}}
视频格式{{if .AssetVideoSource.Config.VideoFormat}}{{.AssetVideoSource.Config.VideoFormat}}{{else}}-{{end}}
焦距{{if .AssetVideoSource.Config.FocalLength}}{{.AssetVideoSource.Config.FocalLength}}{{else}}-{{end}}
安装高度{{if .AssetVideoSource.Config.MountHeight}}{{.AssetVideoSource.Config.MountHeight}}{{else}}-{{end}}
安装角度{{if .AssetVideoSource.Config.MountAngle}}{{.AssetVideoSource.Config.MountAngle}}{{else}}-{{end}}
{{end}}
{{end}} {{else}}
{{icon "template"}}识别模板
{{len .AssetTemplates}}
{{if .ConfigSources.Root}}{{.ConfigSources.Root}}{{else}}标准模板与配置均存储在本地数据库{{end}}
{{icon "device"}}视频源
{{len .AssetVideoSources}}
可复用输入流配置
{{icon "overlay"}}调试参数
{{len .AssetOverlays}}
调试与敏感度变化
{{icon "service"}}第三方服务
{{len .AssetIntegrations}}
告警、对象存储和认证服务

{{icon "template"}}识别模板

{{range .AssetTemplates}} {{.Name}} {{.NodeCount}}节点 / {{.EdgeCount}}连线 {{else}}
还没有模板
{{end}}

{{icon "device"}}视频源

{{icon "service"}}第三方服务

{{range .AssetIntegrations}} {{.Name}} {{if .AddressSummary}}{{.AddressSummary}}{{else}}{{.TypeLabel}}{{end}} {{else}}
还没有第三方服务
{{end}}

{{icon "overlay"}}调试参数

{{range .AssetOverlays}} {{.Name}} {{.OverrideTargetNum}} 个目标 {{else}}
还没有调试参数
{{end}}
{{end}} {{if .Error}}
{{.Error}}
{{end}} {{template "asset_tabs_end" .}} {{end}}