mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-26 07:51:08 +00:00
1 line
4.1 MiB
JavaScript
1 line
4.1 MiB
JavaScript
|
(self.webpackChunkgns3_web_ui=self.webpackChunkgns3_web_ui||[]).push([[179],{5735:function(Ae,K,m){"use strict";m.d(K,{o:function(){return P}});var G=m(5671),W=m(3144),A=m(591),H=m(8929),P=function(){function I(){(0,G.Z)(this,I),this.data=[],this.dataChange=new A.X([]),this.itemUpdated=new H.xQ}return(0,W.Z)(I,[{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 j=this;E.forEach(function(v){var x=j.findIndex(v);if(x>=0){var w=Object.assign(j.data[x],v);j.data[x]=w}else j.data.push(v)}),this.data.filter(function(v){return 0===E.filter(function(x){return j.getItemKey(x)===j.getItemKey(v)}).length}).forEach(function(v){return j.remove(v)}),this.dataChange.next(this.data)}},{key:"get",value:function(E){var j=this,R=this.data.findIndex(function(v){return j.getItemKey(v)===E});if(R>=0)return this.data[R]}},{key:"update",value:function(E){var j=this.findIndex(E);if(j>=0){var R=Object.assign(this.data[j],E);this.data[j]=R,this.dataChange.next(this.data),this.itemUpdated.next(R)}}},{key:"remove",value:function(E){var j=this.findIndex(E);j>=0&&(this.data.splice(j,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 j=this;return this.data.findIndex(function(R){return j.getItemKey(R)===j.getItemKey(E)})}}]),I}()},6215:function(Ae,K,m){"use strict";m.d(K,{F:function(){return T}});var G=m(5671),W=m(3144),A=m(136),H=m(9388),P=m(5735),I=m(5e3),T=function(E){(0,A.Z)(R,E);var j=(0,H.Z)(R);function R(){return(0,G.Z)(this,R),j.apply(this,arguments)}return(0,W.Z)(R,[{key:"getItemKey",value:function(x){return x.link_id}}]),R}(P.o);T.\u0275fac=function(){var E;return function(R){return(E||(E=I.n5z(T)))(R||T)}}(),T.\u0275prov=I.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),H=m(9388),P=m(5735),I=m(5e3),T=function(E){(0,A.Z)(R,E);var j=(0,H.Z)(R);function R(){return(0,G.Z)(this,R),j.apply(this,arguments)}return(0,W.Z)(R,[{key:"getItemKey",value:function(x){return x.node_id}}]),R}(P.o);T.\u0275fac=function(){var E;return function(R){return(E||(E=I.n5z(T)))(R||T)}}(),T.\u0275prov=I.Yz7({token:T,factory:T.\u0275fac})},5542:function(Ae,K,m){"use strict";m.d(K,{X:function(){return I}});var G=m(5671),W=m(3144),A=m(4766),H=m(5e3),P=m(2437),I=function(){function T(E){(0,G.Z)(this,T),this.httpController=E}return(0,W.Z)(T,[{key:"getComputes",value:function(j){return this.httpController.get(j,"/computes")}},{key:"getUploadPath",value:function(j,R,v){return"".concat(j.protocol,"//").concat(j.host,":").concat(j.port,"/").concat(A.N.current_version,"/").concat(R,"/images/").concat(v)}},{key:"getStatistics",value:function(j){return this.httpController.get(j,"/statistics")}}]),T}();I.\u0275fac=function(E){return new(E||I)(H.LFG(P.zw))},I.\u0275prov=H.Yz7({token:I,factory:I.\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),H=m(9388),P=m(5724),I=m(5e3),T=m(4766),E=m(1737),j=m(7221),R=m(520),v=function(Z){(0,A.Z)(b,Z);var D=(0,H.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,P.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=I.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 I.vpe}return(0,W.Z)(Z,[{key:"get",value:function(b,S,k){k=t
|