mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-28 23:00:12 +03:00
3 lines
34 KiB
JavaScript
3 lines
34 KiB
JavaScript
import{$ as ke,A as _e,B as ye,D as fe,E as xe,F as Ce,N as be,R as ve,S as Me,U as Se,V as Pe,W as Oe,_ as we,a as V,b as H,ba as ze,c as me,ca as Ee,da as Te,e as pe,ea as Fe,f as ge,fa as Ie,g as ue,ga as Ne,ha as De,ia as $e,ja as We,w as he}from"./chunk-3DUTSYEG.js";import{$a as S,Aa as X,Ac as re,Bc as I,Ca as q,Cb as B,Da as A,Db as K,Ea as s,Eb as F,Gb as r,Hb as _,Ib as ee,Jb as Q,Kd as ae,Ma as z,Pd as se,Qb as te,Sa as E,Tb as v,Te as N,Ue as D,Wa as J,Wd as le,Xa as T,Yb as U,Za as M,_b as G,_e as $,a as j,af as de,b as L,bf as W,cb as w,da as h,db as k,dc as ne,eb as d,fb as n,gb as i,ha as x,hb as b,ia as C,je as ce,ma as Z,mc as oe,oa as O,ob as P,qb as p,sb as u,vc as ie}from"./chunk-G7NALUVX.js";var Qe=(a,m)=>m.name;function Ue(a,m){if(a&1&&(n(0,"div",5),b(1,"span",6),n(2,"span",7)(3,"strong"),r(4),i(),n(5,"span"),r(6),i()()()),a&2){let e=m.$implicit;d("matTooltip",e.bpf),s(),K("background",e.color),F("marker-legend__swatch--default",!e.color),s(3),_(e.name),s(2),_(e.bpf)}}function Ge(a,m){if(a&1&&(n(0,"div",3),w(1,Ue,7,7,"div",5,Qe),i()),a&2){let e=u();s(),k(e.entries())}}function Ye(a,m){if(a&1){let e=P();n(0,"div",4)(1,"mat-icon"),r(2,"insights"),i(),n(3,"span"),r(4,"No markers defined"),i(),n(5,"button",8),p("click",function(){x(e);let t=u();return C(t.onClick())}),r(6,"Open marker manager"),i()()}}var Ve=(()=>{class a{registry=h(Te);openMarkerManager=new O;entries=ne(()=>{let e=this.registry.entries(),o=new Map;for(let l of e)o.has(l.name)||o.set(l.name,{bpf:l.bpf,color:l.color});let t=[];for(let[l,c]of o)t.push({name:l,bpf:c.bpf,color:c.color});return t});onClick(){this.openMarkerManager.emit()}static \u0275fac=function(o){return new(o||a)};static \u0275cmp=z({type:a,selectors:[["app-marker-legend"]],outputs:{openMarkerManager:"openMarkerManager"},decls:9,vars:2,consts:[[1,"marker-legend"],[1,"marker-legend__header"],["mat-icon-button","","type","button","aria-label","Open marker manager","matTooltip","Open marker manager","matTooltipPosition","left",1,"marker-legend__manage",3,"click"],[1,"marker-legend__list"],[1,"marker-legend__empty"],["matTooltipPosition","above",1,"marker-legend__row",3,"matTooltip"],[1,"marker-legend__swatch"],[1,"marker-legend__identity"],["mat-button","","type","button",3,"click"]],template:function(o,t){o&1&&(n(0,"div",0)(1,"div",1)(2,"span"),r(3),i(),n(4,"button",2),p("click",function(){return t.onClick()}),n(5,"mat-icon"),r(6,"settings"),i()()(),M(7,Ge,3,0,"div",3)(8,Ye,7,0,"div",4),i()),o&2&&(s(3),ee("",t.entries().length," markers"),s(4),S(t.entries().length>0?7:8))},dependencies:[I,H,V,D,N,W,de,$],styles:[".marker-legend[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;min-height:0;flex-direction:column}.marker-legend__header[_ngcontent-%COMP%]{display:flex;min-height:var(--topology-control-height);align-items:center;justify-content:space-between;padding-inline:var(--gns3-density-space-3);color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-label-medium);font-weight:600}.marker-legend__manage[_ngcontent-%COMP%]{width:var(--topology-control-height);height:var(--topology-control-height)}.marker-legend__list[_ngcontent-%COMP%]{min-height:0;flex:1 1 auto;overflow:auto;overflow-x:hidden}.marker-legend__row[_ngcontent-%COMP%]{display:flex;min-height:var(--topology-row-height);box-sizing:border-box;align-items:center;gap:var(--gns3-density-space-2);padding-inline:var(--gns3-density-space-3);border-bottom:1px solid var(--mat-sys-outline-variant);cursor:default}.marker-legend__row[_ngcontent-%COMP%]:hover{background:var(--mat-sys-surface-container)}.marker-legend__swatch[_ngcontent-%COMP%]{width:12px;height:12px;flex:0 0 12px;border-radius:3px}.marker-legend__swatch--default[_ngcontent-%COMP%]{background-color:var(--mat-sys-primary)}.marker-legend__identity[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.marker-legend__identity[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .marker-legend__identity[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.marker-legend__identity[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font:var(--mat-sys-body-small);font-weight:600;color:var(--mat-sys-on-surface)}.marker-legend__identity[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-label-small)}.marker-legend__empty[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:column;align-items:center;justify-content:center;gap:var(--gns3-density-space-2);color:var(--mat-sys-on-surface-variant)}.marker-legend__empty[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant)}.marker-legend__empty[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--mat-sys-body-small)}"],changeDetection:0})}return a})();var Ze=()=>({top:!0}),Xe=()=>({right:!0}),qe=()=>({bottom:!0}),Je=()=>({left:!0}),Ke=()=>({top:!0,left:!0}),et=()=>({top:!0,right:!0}),tt=()=>({bottom:!0,left:!0}),nt=()=>({bottom:!0,right:!0}),ot=(a,m)=>m.node_id,it=(a,m)=>m.compute_id;function rt(a,m){if(a&1){let e=P();n(0,"div",37),p("mousemove",function(t){x(e);let l=u();return C(l.dragWidget(t))},A)("mouseup",function(){x(e);let t=u();return C(t.toggleDragging(!1))},A),i()}}function at(a,m){a&1&&(n(0,"mat-icon"),r(1,"map"),i(),n(2,"span"),r(3,"Topology"),i())}function st(a,m){if(a&1&&(n(0,"span",21),r(1),i()),a&2){let e=u();s(),_(e.activeFilterCount)}}function lt(a,m){if(a&1&&b(0,"img",42),a&2){let e=u().$implicit;d("src",e.symbol_url,X)}}function ct(a,m){a&1&&(n(0,"mat-icon"),r(1,"dns"),i())}function dt(a,m){if(a&1){let e=P();n(0,"div",38),p("click",function(){let t=x(e).$implicit,l=u();return C(l.selectNode(t))})("keydown.enter",function(){let t=x(e).$implicit,l=u();return C(l.selectNode(t))}),n(1,"div",39),b(2,"span",40),n(3,"span",41),M(4,lt,1,1,"img",42)(5,ct,2,0,"mat-icon"),i(),n(6,"span",43)(7,"strong"),r(8),i()()(),n(9,"span",44),r(10),i(),n(11,"span",45),r(12),i(),n(13,"button",46),p("click",function(t){let l=x(e).$implicit;return u().selectNode(l),C(t.stopPropagation())}),n(14,"mat-icon"),r(15,"more_horiz"),i()()()}if(a&2){let e=m.$implicit,o=u(),t=B(60);F("node-row--selected",(o.selectedNode==null?null:o.selectedNode.node_id)===e.node_id),s(2),d("matTooltip",o.getStatusLabel(e.status)),T("data-status",e.status)("aria-label",o.getStatusLabel(e.status)),s(2),S(e.symbol_url?4:5),s(4),_(e.name),s(2),_(o.hasConsole(e)?e.console_type:"none"),s(2),_(o.hasConsole(e)?e.console:"-"),s(),J("aria-label",te("Actions for ",e.name)),d("matMenuTriggerFor",t)}}function mt(a,m){a&1&&(n(0,"div",32)(1,"mat-icon"),r(2,"search_off"),i(),n(3,"span"),r(4,"No nodes match the current filters"),i()())}function pt(a,m){a&1&&(n(0,"mat-icon"),r(1,"insights"),i(),n(2,"span"),r(3,"Markers"),i())}function gt(a,m){a&1&&(n(0,"mat-icon"),r(1,"dns"),i(),n(2,"span"),r(3,"Computes"),i())}function ut(a,m){if(a&1&&(n(0,"div",36),b(1,"span",47),n(2,"span",48)(3,"strong"),r(4),i(),n(5,"span"),r(6),i()(),n(7,"span",49)(8,"span"),r(9,"CPU"),i(),n(10,"strong"),r(11),U(12,"number"),i()(),n(13,"span",49)(14,"span"),r(15,"Memory"),i(),n(16,"strong"),r(17),U(18,"number"),i()()()),a&2){let e=m.$implicit,o=u();d("matTooltip",o.getComputeTooltip(e)),s(),T("data-status",e.connected?"started":"stopped"),s(3),_(e.name||e.compute_id),s(2),Q("",e.host,":",e.port),s(5),_(e.cpu_usage_percent!==null&&e.cpu_usage_percent!==void 0?G(12,7,e.cpu_usage_percent,"1.0-1")+"%":"-"),s(6),_(e.memory_usage_percent!==null&&e.memory_usage_percent!==void 0?G(18,10,e.memory_usage_percent,"1.0-1")+"%":"-")}}function ht(a,m){a&1&&(n(0,"div",32)(1,"mat-icon"),r(2,"dns"),i(),n(3,"span"),r(4,"No computes available"),i()())}var an=(()=>{class a{nodesDataSource=h(Ee);computeService=h(xe);linksDataSource=h(ze);notificationService=h(Ce);toasterService=h(be);nodeConsoleService=h(Fe);mapSettingsService=h(ke);cd=h(oe);document=h(Z);controller;project;openWebConsoleInline=new O;openMarkerManager=new O;computesInitialized=!1;style={};subscriptions=[];nodes=[];filteredNodes=[];sortingOrder="asc";startedStatusFilterEnabled=!1;suspendedStatusFilterEnabled=!1;stoppedStatusFilterEnabled=!1;captureFilterEnabled=!1;packetFilterEnabled=!1;computes=[];searchQuery="";selectedNode=null;selectedTabIndex=0;isDraggingEnabled=!1;ngOnInit(){this.subscriptions.push(this.nodesDataSource.changes.subscribe(e=>{let o=this.selectedNode?.node_id;this.nodes=e.map(t=>this.normalizeConsoleHost(t)),this.selectedNode=o?this.nodes.find(t=>t.node_id===o)??null:null,this.applyFilters(),this.cd.markForCheck()})),this.initializeComputes(),this.revertPosition()}initializeComputes(){!this.controller||this.computesInitialized||(this.computesInitialized=!0,this.subscriptions.push(this.notificationService.computeCacheUpdated.subscribe(e=>{this.computes=e,this.cd.markForCheck()})),this.subscriptions.push(this.computeService.getComputes(this.controller).subscribe({next:e=>{this.computes=e,this.notificationService.setInitialComputes(e),this.cd.markForCheck()},error:e=>{let o=e.error?.message||e.message||"Failed to load computes";this.toasterService.error(o),this.cd.markForCheck()}})))}normalizeConsoleHost(e){return(e.console_host==="0.0.0.0"||e.console_host==="0:0:0:0:0:0:0:0"||e.console_host==="::")&&this.controller?.host?L(j({},e),{console_host:this.controller.host}):e}revertPosition(){let e=this.document.defaultView?.innerWidth??1280,o=this.document.defaultView?.innerHeight??800;if(e<=720){this.style={position:"fixed",top:"56px",left:"0px",width:`${e}px`,height:`${Math.max(0,o-56)}px`};return}let t=localStorage.getItem("leftPosition"),l=localStorage.getItem("rightPosition"),c=localStorage.getItem("topPosition"),g=localStorage.getItem("widthOfWidget"),R=localStorage.getItem("heightOfWidget");if(c){let f=Math.min(Math.max(Number(g)||720,400),e),Y=Math.min(Math.max(Number(R)||680,420),o),He=Math.min(Math.max(Number(c)||0,0),Math.max(0,o-Y)),Re=t!==null?{left:`${Math.min(Math.max(Number(t)||0,0),Math.max(0,e-f))}px`}:{right:`${Math.min(Math.max(Number(l)||0,0),Math.max(0,e-f))}px`};this.style=L(j({position:"fixed"},Re),{top:`${He}px`,width:`${f}px`,height:`${Y}px`})}else{let y=this.document.documentElement.dataset.density==="compact";this.style={top:y?"56px":"68px",right:y?"8px":"16px",width:"720px",height:"680px"}}}onViewportResize(){this.revertPosition()}toggleDragging(e){this.isDraggingEnabled=e}startDraggingFromTabStrip(e){let o=e.target;e.button===0&&o.closest(".mat-mdc-tab-header")&&this.toggleDragging(!0)}dragWidget(e){let o=Number(e.movementX),t=Number(e.movementY),l=Number(this.style.width.split("px")[0]),c=Number(this.style.height.split("px")[0]),g=this.document.defaultView?.innerWidth??1280,R=this.document.defaultView?.innerHeight??800,y=this.clamp(Number(this.style.top.split("px")[0])+t,0,R-c);if(this.style.left){let f=this.clamp(Number(this.style.left.split("px")[0])+o,0,g-l);this.style={position:"fixed",left:`${f}px`,top:`${y}px`,width:`${l}px`,height:`${c}px`},localStorage.setItem("leftPosition",f.toString()),localStorage.removeItem("rightPosition"),localStorage.setItem("topPosition",y.toString()),localStorage.setItem("widthOfWidget",l.toString()),localStorage.setItem("heightOfWidget",c.toString())}else{let f=this.clamp(Number(this.style.right.split("px")[0])-o,0,g-l);this.style={position:"fixed",right:`${f}px`,top:`${y}px`,width:`${l}px`,height:`${c}px`},localStorage.setItem("rightPosition",f.toString()),localStorage.removeItem("leftPosition"),localStorage.setItem("topPosition",y.toString()),localStorage.setItem("widthOfWidget",l.toString()),localStorage.setItem("heightOfWidget",c.toString())}}clamp(e,o,t){return Math.min(Math.max(e,o),Math.max(o,t))}validate(e){return!(e.rectangle.width&&e.rectangle.height&&(e.rectangle.width<400||e.rectangle.height<420))}onResizeEnd(e){this.style={position:"fixed",left:`${e.rectangle.left}px`,top:`${e.rectangle.top}px`,width:`${e.rectangle.width}px`,height:`${e.rectangle.height}px`},localStorage.setItem("leftPosition",e.rectangle.left.toString()),localStorage.removeItem("rightPosition"),localStorage.setItem("topPosition",e.rectangle.top.toString()),localStorage.setItem("widthOfWidget",e.rectangle.width.toString()),localStorage.setItem("heightOfWidget",e.rectangle.height.toString())}onTabSelectionChange(e){this.selectedTabIndex=e}compareAsc(e,o){return e.name.localeCompare(o.name)}compareDesc(e,o){return o.name.localeCompare(e.name)}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}setSortingOrder(){this.applyFilters()}setSearchQuery(e){this.searchQuery=e,this.applyFilters()}applyStatusFilter(e){e==="started"?this.startedStatusFilterEnabled=!this.startedStatusFilterEnabled:e==="stopped"?this.stoppedStatusFilterEnabled=!this.stoppedStatusFilterEnabled:e==="suspended"&&(this.suspendedStatusFilterEnabled=!this.suspendedStatusFilterEnabled),this.applyFilters()}applyCaptureFilter(e){e==="capture"?this.captureFilterEnabled=!this.captureFilterEnabled:e==="packet"&&(this.packetFilterEnabled=!this.packetFilterEnabled),this.applyFilters()}applyFilters(){let e=[];this.startedStatusFilterEnabled&&(e=e.concat(this.nodes.filter(t=>t.status==="started"))),this.stoppedStatusFilterEnabled&&(e=e.concat(this.nodes.filter(t=>t.status==="stopped"))),this.suspendedStatusFilterEnabled&&(e=e.concat(this.nodes.filter(t=>t.status==="suspended"))),!this.startedStatusFilterEnabled&&!this.stoppedStatusFilterEnabled&&!this.suspendedStatusFilterEnabled&&(e=e.concat(this.nodes)),this.captureFilterEnabled&&(e=this.checkCapturing(e)),this.packetFilterEnabled&&(e=this.checkPacketFilters(e));let o=this.searchQuery.trim().toLocaleLowerCase();o&&(e=e.filter(t=>t.name.toLocaleLowerCase().includes(o))),this.sortingOrder==="asc"?this.filteredNodes=[...e].sort(this.compareAsc):this.filteredNodes=[...e].sort(this.compareDesc)}checkCapturing(e){let o=this.linksDataSource.getItems(),t=new Set;return o.forEach(l=>{l.capturing&&l.nodes.forEach(c=>{t.add(c.node_id)})}),e.filter(l=>t.has(l.node_id))}checkPacketFilters(e){let o=this.linksDataSource.getItems(),t=new Set;return o.forEach(l=>{Object.values(l.filters??{}).some(c=>this.hasActiveFilterValue(c))&&l.nodes.forEach(c=>{t.add(c.node_id)})}),e.filter(l=>t.has(l.node_id))}selectNode(e){this.selectedNode=e}hasConsole(e){return e.console!==null&&e.console!==void 0&&!!e.console_type&&e.console_type!=="none"}canOpenConsole(e){return!e||e.status!=="started"?!1:e.console_type==="telnet"||e.console_type==="ssh"||e.console_type==="vnc"||e.console_type?.startsWith("http")===!0}openConsole(e=this.selectedNode){if(e){if(e.status!=="started"){this.toasterService.error("To open console please start the node");return}if(e.console_type==="vnc"||e.console_type&&e.console_type.startsWith("http")){this.openWebConsoleInline.emit({node:e,controller:this.controller,project:this.project});return}if(e.console_type!=="telnet"&&e.console_type!=="ssh"){this.toasterService.error(`Console type '${e.console_type||"none"}' is not supported in the embedded console.`);return}this.mapSettingsService.logConsoleSubject.next(!0),this.nodeConsoleService.openConsoleForNode(e)}}getStatusLabel(e){return e==="started"?"Running":e==="stopped"?"Stopped":e==="suspended"?"Suspended":e||"Unknown"}get activeFilterCount(){return[this.startedStatusFilterEnabled,this.stoppedStatusFilterEnabled,this.suspendedStatusFilterEnabled,this.captureFilterEnabled,this.packetFilterEnabled].filter(Boolean).length}get connectedComputeCount(){return this.computes.filter(e=>e.connected).length}hasActiveFilterValue(e){return Array.isArray(e)?e.some(o=>o!=null&&o!==""&&o!==0):e!=null&&e!==""&&e!==0&&e!==!1}getComputeTooltip(e){return e?[`Name: ${e.name||"N/A"}`,`Host: ${e.host}:${e.port}`,`Connected: ${e.connected?"Yes":"No"}`,e.cpu_usage_percent!=null?`CPU: ${e.cpu_usage_percent.toFixed(1)}%`:null,e.memory_usage_percent!=null?`Memory: ${e.memory_usage_percent.toFixed(1)}%`:null].filter(Boolean).join(`
|
|
`):""}static \u0275fac=function(o){return new(o||a)};static \u0275cmp=z({type:a,selectors:[["app-topology-summary"]],hostBindings:function(o,t){o&1&&p("resize",function(){return t.onViewportResize()},q)},inputs:{controller:"controller",project:"project"},outputs:{openWebConsoleInline:"openWebConsoleInline",openMarkerManager:"openMarkerManager"},decls:80,vars:36,consts:[["filterMenu","matMenu"],["nodeActionsMenu","matMenu"],["mwlResizable","","aria-label","Topology map",1,"topology-inspector",3,"resizeStart","resizeEnd","ngStyle","validateResize","enableGhostResize"],["mwlResizeHandle","",1,"resize-handle","resize-handle-top",3,"resizeEdges"],["mwlResizeHandle","",1,"resize-handle","resize-handle-right",3,"resizeEdges"],["mwlResizeHandle","",1,"resize-handle","resize-handle-bottom",3,"resizeEdges"],["mwlResizeHandle","",1,"resize-handle","resize-handle-left",3,"resizeEdges"],["mwlResizeHandle","",1,"resize-handle","resize-handle-top-left",3,"resizeEdges"],["mwlResizeHandle","",1,"resize-handle","resize-handle-top-right",3,"resizeEdges"],["mwlResizeHandle","",1,"resize-handle","resize-handle-bottom-left",3,"resizeEdges"],["mwlResizeHandle","",1,"resize-handle","resize-handle-bottom-right",3,"resizeEdges"],["animationDuration","0ms",1,"inspector-tabs",3,"selectedIndexChange","mousedown","selectedIndex"],["mat-tab-label",""],[1,"tab-content"],[1,"node-toolbar"],[1,"search-control"],["type","search","aria-label","Filter nodes","placeholder","Filter nodes",3,"ngModelChange","ngModel"],["aria-label","Sort nodes",1,"sort-control",3,"selectionChange","value"],["value","asc"],["value","desc"],["mat-icon-button","","type","button",1,"filter-button",3,"matMenuTriggerFor"],[1,"filter-button__count"],[1,"topology-filter-menu"],[1,"filter-menu",3,"click"],[1,"filter-menu__label"],[3,"change","checked"],["role","table","aria-label","Project nodes",1,"node-table"],[1,"node-table__body"],["role","row",1,"node-table__header"],["role","columnheader"],["role","columnheader","aria-label","Actions"],["role","row","tabindex","0",1,"node-row",3,"node-row--selected"],[1,"empty-state"],["mat-menu-item","",3,"click","disabled"],[3,"openMarkerManager"],[1,"compute-list"],["matTooltipPosition","above",1,"compute-row",3,"matTooltip"],[3,"mousemove","mouseup"],["role","row","tabindex","0",1,"node-row",3,"click","keydown.enter"],["role","cell",1,"node-cell"],[1,"status-dot",3,"matTooltip"],[1,"node-symbol"],["alt","",3,"src"],[1,"node-identity"],["role","cell",1,"protocol-cell"],["role","cell",1,"port-cell"],["mat-icon-button","","type","button",1,"row-action",3,"click","aria-label","matMenuTriggerFor"],[1,"status-dot"],[1,"compute-identity"],[1,"compute-metric"]],template:function(o,t){if(o&1){let l=P();M(0,rt,1,0,"div"),n(1,"section",2),p("resizeStart",function(){return t.toggleDragging(!1)})("resizeEnd",function(g){return t.onResizeEnd(g)}),b(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7)(7,"div",8)(8,"div",9)(9,"div",10),n(10,"mat-tab-group",11),p("selectedIndexChange",function(g){return t.onTabSelectionChange(g)})("mousedown",function(g){return t.startDraggingFromTabStrip(g)}),n(11,"mat-tab"),E(12,at,4,0,"ng-template",12),n(13,"div",13)(14,"div",14)(15,"div",15)(16,"mat-icon"),r(17,"search"),i(),n(18,"input",16),p("ngModelChange",function(g){return t.setSearchQuery(g)}),i()(),n(19,"mat-select",17),p("selectionChange",function(g){return x(l),t.sortingOrder=g.value,C(t.setSortingOrder())}),n(20,"mat-option",18),r(21,"Name (A-Z)"),i(),n(22,"mat-option",19),r(23,"Name (Z-A)"),i()(),n(24,"button",20)(25,"mat-icon"),r(26,"filter_alt"),i(),M(27,st,2,1,"span",21),i()(),n(28,"mat-menu",22,0)(30,"div",23),p("click",function(g){return g.stopPropagation()}),n(31,"span",24),r(32,"Status"),i(),n(33,"mat-checkbox",25),p("change",function(){return t.applyStatusFilter("started")}),r(34," Running "),i(),n(35,"mat-checkbox",25),p("change",function(){return t.applyStatusFilter("stopped")}),r(36," Stopped "),i(),n(37,"mat-checkbox",25),p("change",function(){return t.applyStatusFilter("suspended")}),r(38," Suspended "),i(),b(39,"mat-divider"),n(40,"span",24),r(41,"Links"),i(),n(42,"mat-checkbox",25),p("change",function(){return t.applyCaptureFilter("capture")}),r(43," Active capture "),i(),n(44,"mat-checkbox",25),p("change",function(){return t.applyCaptureFilter("packet")}),r(45," Packet filter "),i()()(),n(46,"div",26)(47,"div",27)(48,"div",28)(49,"span",29),r(50,"Node"),i(),n(51,"span",29),r(52,"Protocol"),i(),n(53,"span",29),r(54,"Port"),i(),b(55,"span",30),i(),w(56,dt,16,12,"div",31,ot,!1,mt,5,0,"div",32),i()(),n(59,"mat-menu",null,1)(61,"button",33),p("click",function(){return t.openConsole()}),n(62,"mat-icon"),r(63,"terminal"),i(),n(64,"span"),r(65,"Open console"),i()()()()(),n(66,"mat-tab"),E(67,pt,4,0,"ng-template",12),n(68,"div",13)(69,"app-marker-legend",34),p("openMarkerManager",function(){return t.openMarkerManager.emit()}),i()()(),n(70,"mat-tab"),E(71,gt,4,0,"ng-template",12),n(72,"div",13)(73,"div")(74,"span"),r(75),i()(),n(76,"div",35),w(77,ut,19,13,"div",36,it,!1,ht,5,0,"div",32),i()()()()()}if(o&2){let l=B(29);S(t.isDraggingEnabled?0:-1),s(),d("ngStyle",t.style)("validateResize",t.validate)("enableGhostResize",!0),s(),d("resizeEdges",v(28,Ze)),s(),d("resizeEdges",v(29,Xe)),s(),d("resizeEdges",v(30,qe)),s(),d("resizeEdges",v(31,Je)),s(),d("resizeEdges",v(32,Ke)),s(),d("resizeEdges",v(33,et)),s(),d("resizeEdges",v(34,tt)),s(),d("resizeEdges",v(35,nt)),s(),d("selectedIndex",t.selectedTabIndex),s(8),d("ngModel",t.searchQuery),s(),d("value",t.sortingOrder),s(5),d("matMenuTriggerFor",l),T("aria-label",t.activeFilterCount?t.activeFilterCount+" active node filters":"Filter nodes"),s(3),S(t.activeFilterCount?27:-1),s(6),d("checked",t.startedStatusFilterEnabled),s(2),d("checked",t.stoppedStatusFilterEnabled),s(2),d("checked",t.suspendedStatusFilterEnabled),s(5),d("checked",t.captureFilterEnabled),s(2),d("checked",t.packetFilterEnabled),s(12),k(t.filteredNodes),s(5),d("disabled",!t.canOpenConsole(t.selectedNode)),s(14),Q("",t.computes.length," computes \xB7 ",t.connectedComputeCount," connected"),s(2),k(t.computes)}},dependencies:[I,ie,ce,ae,se,le,we,Se,Pe,Oe,fe,ye,he,_e,Ne,Ie,H,V,D,N,W,$,ue,pe,me,ge,Me,ve,We,De,$e,Ve,re],styles:["[_nghost-%COMP%]{--topology-row-height: 46px;--topology-row-action-size: 32px;--topology-symbol-size: 30px;--topology-control-height: var(--gns3-density-control-height)}.topology-inspector[_ngcontent-%COMP%]{position:fixed;z-index:900;display:flex;min-width:400px;max-width:calc(100vw - 32px);min-height:420px;max-height:calc(100vh - 84px);box-sizing:border-box;flex-direction:column;overflow:hidden;border:1px solid var(--mat-sys-outline-variant);border-radius:var(--gns3-density-radius-sm);color:var(--mat-sys-on-surface);background:var(--mat-sys-surface-container-low);box-shadow:0 16px 40px color-mix(in srgb,var(--mat-sys-shadow) 22%,transparent);container-name:topology-panel;container-type:inline-size}.resize-handle[_ngcontent-%COMP%]{position:absolute;z-index:10;background:transparent}.resize-handle.resize-handle-top[_ngcontent-%COMP%], .resize-handle.resize-handle-bottom[_ngcontent-%COMP%]{left:12px;right:12px;height:10px;cursor:ns-resize}.resize-handle.resize-handle-top[_ngcontent-%COMP%]{top:-4px}.resize-handle.resize-handle-bottom[_ngcontent-%COMP%]{bottom:-4px}.resize-handle.resize-handle-left[_ngcontent-%COMP%], .resize-handle.resize-handle-right[_ngcontent-%COMP%]{top:12px;bottom:12px;width:10px;cursor:ew-resize}.resize-handle.resize-handle-left[_ngcontent-%COMP%]{left:-4px}.resize-handle.resize-handle-right[_ngcontent-%COMP%]{right:-4px}.resize-handle.resize-handle-top-left[_ngcontent-%COMP%], .resize-handle.resize-handle-top-right[_ngcontent-%COMP%], .resize-handle.resize-handle-bottom-left[_ngcontent-%COMP%], .resize-handle.resize-handle-bottom-right[_ngcontent-%COMP%]{width:18px;height:18px}.resize-handle.resize-handle-top-left[_ngcontent-%COMP%], .resize-handle.resize-handle-bottom-right[_ngcontent-%COMP%]{cursor:nwse-resize}.resize-handle.resize-handle-top-right[_ngcontent-%COMP%], .resize-handle.resize-handle-bottom-left[_ngcontent-%COMP%]{cursor:nesw-resize}.resize-handle.resize-handle-top-left[_ngcontent-%COMP%]{top:-5px;left:-5px}.resize-handle.resize-handle-top-right[_ngcontent-%COMP%]{top:-5px;right:-5px}.resize-handle.resize-handle-bottom-left[_ngcontent-%COMP%]{bottom:-5px;left:-5px}.resize-handle.resize-handle-bottom-right[_ngcontent-%COMP%]{right:-5px;bottom:-5px}.node-cell[_ngcontent-%COMP%], .node-identity[_ngcontent-%COMP%], .compute-identity[_ngcontent-%COMP%], .compute-row[_ngcontent-%COMP%]{min-width:0}.inspector-tabs[_ngcontent-%COMP%]{min-height:0;flex:1 1 auto}.tab-content[_ngcontent-%COMP%]{display:flex;min-height:0;height:100%;box-sizing:border-box;flex-direction:column;gap:var(--gns3-density-space-2);padding:var(--gns3-density-space-2) var(--gns3-density-space-3)}.tab-content[_ngcontent-%COMP%] app-marker-legend[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;min-height:0;margin:calc(-1 * var(--gns3-density-space-2)) calc(-1 * var(--gns3-density-space-3))}.node-toolbar[_ngcontent-%COMP%]{display:grid;min-width:0;grid-template-columns:minmax(180px,1fr) minmax(150px,180px) var(--topology-control-height);align-items:center;justify-content:start;gap:var(--gns3-density-space-2)}.search-control[_ngcontent-%COMP%], .sort-control[_ngcontent-%COMP%], .filter-button[_ngcontent-%COMP%]{height:var(--topology-control-height);box-sizing:border-box}.search-control[_ngcontent-%COMP%]{display:flex;min-width:0;align-items:center;gap:var(--gns3-density-space-2);padding-inline:var(--gns3-density-space-3);border:1px solid var(--mat-sys-outline);border-radius:var(--gns3-density-radius-sm);background:var(--mat-sys-surface-container-lowest)}.search-control[_ngcontent-%COMP%]:focus-within{border-color:var(--mat-sys-primary);outline:1px solid var(--mat-sys-primary)}.search-control[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--mat-sys-on-surface-variant)}.search-control[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:0;width:100%;border:0;outline:0;color:var(--mat-sys-on-surface);background:transparent;font:var(--mat-sys-body-medium);letter-spacing:0}.search-control[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--mat-sys-on-surface-variant)}.filter-button[_ngcontent-%COMP%]{position:relative;display:flex;width:var(--topology-control-height);min-width:0;align-items:center;justify-content:center;border:1px solid var(--mat-sys-outline);padding:0}.filter-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin:0;line-height:normal}.filter-button__count[_ngcontent-%COMP%]{position:absolute;top:2px;right:2px;display:grid;min-width:16px;height:16px;box-sizing:border-box;place-items:center;padding-inline:3px;border-radius:8px;color:var(--mat-sys-on-primary);background:var(--mat-sys-primary);font:var(--mat-sys-label-small)}.sort-control[_ngcontent-%COMP%]{display:flex;align-items:center;border:1px solid var(--mat-sys-outline);border-radius:var(--gns3-density-radius-sm);background:var(--mat-sys-surface-container-lowest)}.sort-control[_ngcontent-%COMP%]{padding-inline:var(--gns3-density-space-3)}.filter-menu[_ngcontent-%COMP%]{display:grid;min-width:220px;gap:var(--gns3-density-space-1);padding:var(--gns3-density-space-2) var(--gns3-density-space-3)}.filter-menu__label[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-label-small)}.node-table[_ngcontent-%COMP%]{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;overflow:hidden;border:1px solid var(--mat-sys-outline-variant);border-radius:var(--gns3-density-radius-sm);background:var(--mat-sys-surface-container-lowest)}.node-table__header[_ngcontent-%COMP%], .node-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(190px,260px) 82px 64px minmax(0,1fr) 36px;align-items:center}.node-table__header[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:last-child, .row-action[_ngcontent-%COMP%]{grid-column:5}.node-table__header[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1;min-height:32px;padding-inline:var(--gns3-density-space-3) var(--gns3-density-space-1);border-bottom:1px solid var(--mat-sys-outline-variant);color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface-container);font:var(--mat-sys-label-medium);font-weight:600}.node-table__body[_ngcontent-%COMP%], .compute-list[_ngcontent-%COMP%]{min-height:0;flex:1 1 auto;overflow:auto;overflow-x:hidden}.node-row[_ngcontent-%COMP%]{min-height:var(--topology-row-height);box-sizing:border-box;padding-inline:var(--gns3-density-space-3) var(--gns3-density-space-1);border-bottom:1px solid var(--mat-sys-outline-variant);outline:0;cursor:pointer}.node-row[_ngcontent-%COMP%]:hover, .node-row[_ngcontent-%COMP%]:focus-visible{background:var(--mat-sys-surface-container)}.node-row--selected[_ngcontent-%COMP%]{background:var(--mat-sys-primary-container);box-shadow:inset 3px 0 var(--mat-sys-primary)}.node-cell[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--gns3-density-space-2);overflow:hidden}.status-dot[_ngcontent-%COMP%], .compute-row[_ngcontent-%COMP%] .status-dot[_ngcontent-%COMP%]{display:inline-block;width:12px;height:12px;flex:0 0 12px;border-radius:50%;background:var(--mat-sys-outline)}.status-dot[data-status=started][_ngcontent-%COMP%], .compute-row[_ngcontent-%COMP%] .status-dot[data-status=started][_ngcontent-%COMP%]{background:var(--custom-mat-sys-success)}.status-dot[data-status=stopped][_ngcontent-%COMP%], .compute-row[_ngcontent-%COMP%] .status-dot[data-status=stopped][_ngcontent-%COMP%]{background:var(--mat-sys-error)}.status-dot[data-status=suspended][_ngcontent-%COMP%], .compute-row[_ngcontent-%COMP%] .status-dot[data-status=suspended][_ngcontent-%COMP%]{background:var(--mat-sys-secondary)}.node-symbol[_ngcontent-%COMP%]{display:grid;width:var(--topology-symbol-size);height:var(--topology-symbol-size);flex:0 0 var(--topology-symbol-size);place-items:center}.node-symbol[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;max-width:100%;max-height:100%;object-fit:contain}.node-symbol[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--mat-sys-primary)}.node-identity[_ngcontent-%COMP%], .compute-identity[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.node-identity[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .node-identity[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .compute-identity[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .compute-identity[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.node-identity[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .compute-identity[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font:var(--mat-sys-body-small);font-weight:600}.node-identity[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .compute-identity[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-label-small)}.protocol-cell[_ngcontent-%COMP%], .port-cell[_ngcontent-%COMP%]{width:100%;min-width:0;box-sizing:border-box;overflow:hidden;justify-self:start;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-label-medium);text-align:left;text-overflow:ellipsis;white-space:nowrap}.node-table__header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .node-table__header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){width:100%;justify-self:start;text-align:left}.row-action[_ngcontent-%COMP%]{--mat-icon-button-state-layer-size: var(--topology-row-action-size);display:inline-flex;width:var(--topology-row-action-size);height:var(--topology-row-action-size);align-self:center;align-items:center;justify-self:center;justify-content:center;padding:0;line-height:1}.row-action[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{display:block;margin:0;line-height:24px}.empty-state[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:var(--gns3-density-space-2);color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-medium)}.compute-list[_ngcontent-%COMP%]{border:1px solid var(--mat-sys-outline-variant);border-radius:var(--gns3-density-radius-sm);background:var(--mat-sys-surface-container-lowest)}.compute-row[_ngcontent-%COMP%]{display:grid;width:100%;min-height:var(--topology-row-height);box-sizing:border-box;grid-template-columns:12px minmax(120px,1fr) minmax(54px,76px) minmax(64px,88px);align-items:center;gap:var(--gns3-density-space-2);padding-inline:var(--gns3-density-space-3);border-bottom:1px solid var(--mat-sys-outline-variant)}.compute-metric[_ngcontent-%COMP%]{display:flex;min-width:0;flex-direction:column;align-items:flex-end;overflow:hidden}.compute-metric[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .compute-metric[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compute-metric[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-label-small)}.compute-metric[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font:var(--mat-sys-body-small);font-weight:600}@container topology-panel (max-width: 640px){.node-toolbar[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr) var(--topology-control-height)}.sort-control[_ngcontent-%COMP%]{display:none}.node-table__header[_ngcontent-%COMP%], .node-row[_ngcontent-%COMP%]{grid-template-columns:minmax(160px,220px) 72px 54px minmax(0,1fr) 32px}}@container topology-panel (max-width: 440px){.node-table__header[_ngcontent-%COMP%], .node-row[_ngcontent-%COMP%]{grid-template-columns:minmax(140px,1fr) 68px 52px 30px}.node-table__header[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:last-child, .row-action[_ngcontent-%COMP%]{grid-column:4}}@media(max-width:720px){.topology-inspector[_ngcontent-%COMP%]{min-width:0;min-height:0;max-width:none;max-height:none;border-radius:0}.resize-handle[_ngcontent-%COMP%]{display:none}}html[data-density=compact][_nghost-%COMP%], html[data-density=compact] [_nghost-%COMP%]{--topology-row-height: 38px;--topology-row-action-size: 28px;--topology-symbol-size: 24px}html[data-density=compact][_nghost-%COMP%] .topology-inspector[_ngcontent-%COMP%], html[data-density=compact] [_nghost-%COMP%] .topology-inspector[_ngcontent-%COMP%]{max-height:calc(100vh - 64px)}html[data-density=compact][_nghost-%COMP%] .node-table__header[_ngcontent-%COMP%], html[data-density=compact] [_nghost-%COMP%] .node-table__header[_ngcontent-%COMP%]{min-height:28px}"],changeDetection:0})}return a})();export{an as TopologySummaryComponent};
|