gns3-web-ui/dist/main.0e3b19f809f31d26.js

1 line
4.1 MiB
JavaScript
Raw Normal View History

2023-11-23 06:19:36 +00:00
(self.webpackChunkgns3_web_ui=self.webpackChunkgns3_web_ui||[]).push([[179],{5735:function(Ae,K,m){"use strict";m.d(K,{o:function(){return I}});var G=m(5671),W=m(3144),A=m(591),j=m(8929),I=function(){function P(){(0,G.Z)(this,P),this.data=[],this.dataChange=new A.X([]),this.itemUpdated=new j.xQ}return(0,W.Z)(P,[{key:"getItems",value:function(){return this.data}},{key:"add",value:function(E){this.findIndex(E)>=0?this.update(E):(this.data.push(E),this.dataChange.next(this.data))}},{key:"set",value:function(E){var H=this;E.forEach(function(v){var x=H.findIndex(v);if(x>=0){var w=Object.assign(H.data[x],v);H.data[x]=w}else H.data.push(v)}),this.data.filter(function(v){return 0===E.filter(function(x){return H.getItemKey(x)===H.getItemKey(v)}).length}).forEach(function(v){return H.remove(v)}),this.dataChange.next(this.data)}},{key:"get",value:function(E){var H=this,R=this.data.findIndex(function(v){return H.getItemKey(v)===E});if(R>=0)return this.data[R]}},{key:"update",value:function(E){var H=this.findIndex(E);if(H>=0){var R=Object.assign(this.data[H],E);this.data[H]=R,this.dataChange.next(this.data),this.itemUpdated.next(R)}}},{key:"remove",value:function(E){var H=this.findIndex(E);H>=0&&(this.data.splice(H,1),this.dataChange.next(this.data))}},{key:"changes",get:function(){return this.dataChange}},{key:"itemChanged",get:function(){return this.itemUpdated}},{key:"clear",value:function(){this.data=[],this.dataChange.next(this.data)}},{key:"findIndex",value:function(E){var H=this;return this.data.findIndex(function(R){return H.getItemKey(R)===H.getItemKey(E)})}}]),P}()},6215:function(Ae,K,m){"use strict";m.d(K,{F:function(){return T}});var G=m(5671),W=m(3144),A=m(136),j=m(9388),I=m(5735),P=m(5e3),T=function(E){(0,A.Z)(R,E);var H=(0,j.Z)(R);function R(){return(0,G.Z)(this,R),H.apply(this,arguments)}return(0,W.Z)(R,[{key:"getItemKey",value:function(x){return x.link_id}}]),R}(I.o);T.\u0275fac=function(){var E;return function(R){return(E||(E=P.n5z(T)))(R||T)}}(),T.\u0275prov=P.Yz7({token:T,factory:T.\u0275fac})},5366:function(Ae,K,m){"use strict";m.d(K,{G:function(){return T}});var G=m(5671),W=m(3144),A=m(136),j=m(9388),I=m(5735),P=m(5e3),T=function(E){(0,A.Z)(R,E);var H=(0,j.Z)(R);function R(){return(0,G.Z)(this,R),H.apply(this,arguments)}return(0,W.Z)(R,[{key:"getItemKey",value:function(x){return x.node_id}}]),R}(I.o);T.\u0275fac=function(){var E;return function(R){return(E||(E=P.n5z(T)))(R||T)}}(),T.\u0275prov=P.Yz7({token:T,factory:T.\u0275fac})},5542:function(Ae,K,m){"use strict";m.d(K,{X:function(){return P}});var G=m(5671),W=m(3144),A=m(4766),j=m(5e3),I=m(2437),P=function(){function T(E){(0,G.Z)(this,T),this.httpController=E}return(0,W.Z)(T,[{key:"getComputes",value:function(H){return this.httpController.get(H,"/computes")}},{key:"getUploadPath",value:function(H,R,v){return"".concat(H.protocol,"//").concat(H.host,":").concat(H.port,"/").concat(A.N.current_version,"/").concat(R,"/images/").concat(v)}},{key:"getStatistics",value:function(H){return this.httpController.get(H,"/statistics")}}]),T}();P.\u0275fac=function(E){return new(E||P)(j.LFG(I.zw))},P.\u0275prov=j.Yz7({token:P,factory:P.\u0275fac})},2437:function(Ae,K,m){"use strict";m.d(K,{CJ:function(){return x},zw:function(){return w}});var G=m(5671),W=m(3144),A=m(136),j=m(9388),I=m(5724),P=m(5e3),T=m(4766),E=m(1737),H=m(7221),R=m(520),v=function(Z){(0,A.Z)(b,Z);var D=(0,j.Z)(b);function b(S){return(0,G.Z)(this,b),D.call(this,S)}return(0,W.Z)(b,null,[{key:"fromError",value:function(k,M){var N=new b(k);return N.originalError=M,N}}]),b}((0,I.Z)(Error)),x=function(){function Z(){(0,G.Z)(this,Z)}return(0,W.Z)(Z,[{key:"handleError",value:function(b){var S=b;return"HttpErrorResponse"===b.name&&0===b.status&&(S=v.fromError("Controller is unreachable",b)),401===b.status&&window.location.reload(),(0,E._)(S)}}]),Z}();x.\u0275fac=function(D){return new(D||x)},x.\u0275prov=P.Yz7({token:x,factory:x.\u0275fac});var w=function(){function Z(D,b){(0,G.Z)(this,Z),this.http=D,this.errorHandler=b,this.requestsNotificationEmitter=new P.vpe}return(0,W.Z)(Z,[{key:"get",value:function(b,S,k){k=t