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