mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-28 16:58:50 +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(De,K,m){"use strict";m.d(K,{o:function(){return R}});var G=m(5671),W=m(3144),A=m(591),U=m(8929),R=function(){function I(){(0,G.Z)(this,I),this.data=[],this.dataChange=new A.X([]),this.itemUpdated=new U.xQ}return(0,W.Z)(I,[{key:"getItems",value:function(){return this.data}},{key:"add",value:function(D){this.findIndex(D)>=0?this.update(D):(this.data.push(D),this.dataChange.next(this.data))}},{key:"set",value:function(D){var H=this;D.forEach(function(v){var k=H.findIndex(v);if(k>=0){var b=Object.assign(H.data[k],v);H.data[k]=b}else H.data.push(v)}),this.data.filter(function(v){return 0===D.filter(function(k){return H.getItemKey(k)===H.getItemKey(v)}).length}).forEach(function(v){return H.remove(v)}),this.dataChange.next(this.data)}},{key:"get",value:function(D){var H=this,L=this.data.findIndex(function(v){return H.getItemKey(v)===D});if(L>=0)return this.data[L]}},{key:"update",value:function(D){var H=this.findIndex(D);if(H>=0){var L=Object.assign(this.data[H],D);this.data[H]=L,this.dataChange.next(this.data),this.itemUpdated.next(L)}}},{key:"remove",value:function(D){var H=this.findIndex(D);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(D){var H=this;return this.data.findIndex(function(L){return H.getItemKey(L)===H.getItemKey(D)})}}]),I}()},6215:function(De,K,m){"use strict";m.d(K,{F:function(){return E}});var G=m(5671),W=m(3144),A=m(136),U=m(9388),R=m(5735),I=m(5e3),E=function(D){(0,A.Z)(L,D);var H=(0,U.Z)(L);function L(){return(0,G.Z)(this,L),H.apply(this,arguments)}return(0,W.Z)(L,[{key:"getItemKey",value:function(k){return k.link_id}}]),L}(R.o);E.\u0275fac=function(){var D;return function(L){return(D||(D=I.n5z(E)))(L||E)}}(),E.\u0275prov=I.Yz7({token:E,factory:E.\u0275fac})},5366:function(De,K,m){"use strict";m.d(K,{G:function(){return E}});var G=m(5671),W=m(3144),A=m(136),U=m(9388),R=m(5735),I=m(5e3),E=function(D){(0,A.Z)(L,D);var H=(0,U.Z)(L);function L(){return(0,G.Z)(this,L),H.apply(this,arguments)}return(0,W.Z)(L,[{key:"getItemKey",value:function(k){return k.node_id}}]),L}(R.o);E.\u0275fac=function(){var D;return function(L){return(D||(D=I.n5z(E)))(L||E)}}(),E.\u0275prov=I.Yz7({token:E,factory:E.\u0275fac})},5542:function(De,K,m){"use strict";m.d(K,{X:function(){return I}});var G=m(5671),W=m(3144),A=m(4766),U=m(5e3),R=m(2437),I=function(){function E(D){(0,G.Z)(this,E),this.httpController=D}return(0,W.Z)(E,[{key:"getComputes",value:function(H){return this.httpController.get(H,"/computes")}},{key:"getUploadPath",value:function(H,L,v){return"".concat(H.protocol,"//").concat(H.host,":").concat(H.port,"/").concat(A.N.current_version,"/").concat(L,"/images/").concat(v)}},{key:"getStatistics",value:function(H){return this.httpController.get(H,"/statistics")}}]),E}();I.\u0275fac=function(D){return new(D||I)(U.LFG(R.zw))},I.\u0275prov=U.Yz7({token:I,factory:I.\u0275fac})},2437:function(De,K,m){"use strict";m.d(K,{CJ:function(){return k},zw:function(){return b}});var G=m(5671),W=m(3144),A=m(136),U=m(9388),R=m(5724),I=m(5e3),E=m(4766),D=m(1737),H=m(7221),L=m(520),v=function(O){(0,A.Z)(y,O);var S=(0,U.Z)(y);function y(T){return(0,G.Z)(this,y),S.call(this,T)}return(0,W.Z)(y,null,[{key:"fromError",value:function(M,x){var N=new y(M);return N.originalError=x,N}}]),y}((0,R.Z)(Error)),k=function(){function O(){(0,G.Z)(this,O)}return(0,W.Z)(O,[{key:"handleError",value:function(y){var T=y;return"HttpErrorResponse"===y.name&&0===y.status&&(T=v.fromError("Controller is unreachable",y)),401===y.status&&window.location.reload(),(0,D._)(T)}}]),O}();k.\u0275fac=function(S){return new(S||k)},k.\u0275prov=I.Yz7({token:k,factory:k.\u0275fac});var b=function(){function O(S,y){(0,G.Z)(this,O),this.http=S,this.errorHandler=y,this.requestsNotificationEmitter=new I.vpe}return(0,W.Z)(O,[{key:"get",value:function(y,T,M){M=t
|