mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-31 02:11:01 +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 P(){(0,G.Z)(this,P),this.data=[],this.dataChange=new A.X([]),this.itemUpdated=new U.xQ}return(0,W.Z)(P,[{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 j=this;D.forEach(function(v){var k=j.findIndex(v);if(k>=0){var b=Object.assign(j.data[k],v);j.data[k]=b}else j.data.push(v)}),this.data.filter(function(v){return 0===D.filter(function(k){return j.getItemKey(k)===j.getItemKey(v)}).length}).forEach(function(v){return j.remove(v)}),this.dataChange.next(this.data)}},{key:"get",value:function(D){var j=this,L=this.data.findIndex(function(v){return j.getItemKey(v)===D});if(L>=0)return this.data[L]}},{key:"update",value:function(D){var j=this.findIndex(D);if(j>=0){var L=Object.assign(this.data[j],D);this.data[j]=L,this.dataChange.next(this.data),this.itemUpdated.next(L)}}},{key:"remove",value:function(D){var j=this.findIndex(D);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(D){var j=this;return this.data.findIndex(function(L){return j.getItemKey(L)===j.getItemKey(D)})}}]),P}()},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),P=m(5e3),E=function(D){(0,A.Z)(L,D);var j=(0,U.Z)(L);function L(){return(0,G.Z)(this,L),j.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=P.n5z(E)))(L||E)}}(),E.\u0275prov=P.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),P=m(5e3),E=function(D){(0,A.Z)(L,D);var j=(0,U.Z)(L);function L(){return(0,G.Z)(this,L),j.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=P.n5z(E)))(L||E)}}(),E.\u0275prov=P.Yz7({token:E,factory:E.\u0275fac})},5542:function(De,K,m){"use strict";m.d(K,{X:function(){return R}});var G=m(5671),W=m(3144),A=m(5e3),U=m(2437),R=function(){function P(E){(0,G.Z)(this,P),this.httpController=E}return(0,W.Z)(P,[{key:"getComputes",value:function(D){return this.httpController.get(D,"/computes")}},{key:"getStatistics",value:function(D){return this.httpController.get(D,"/statistics")}}]),P}();R.\u0275fac=function(E){return new(E||R)(A.LFG(U.zw))},R.\u0275prov=A.Yz7({token:R,factory:R.\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),P=m(5e3),E=m(4766),D=m(1737),j=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=P.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 P.vpe}return(0,W.Z)(O,[{key:"get",value:function(y,T,M){M=this.getJsonOptions(M);var x=this.getOptionsForController(y,T,M);return this.requestsNotificationEmitter.emit("GET ".concat(x.url)),this.http.get(x.url,x.options).pipe((0,j.K)(this.errorHand
|