46 lines
1.6 KiB
JavaScript
46 lines
1.6 KiB
JavaScript
|
LNProvider.initializers.push(
|
|||
|
new Promise((resolve,reject)=>{
|
|||
|
LN()
|
|||
|
.load("/ln.provider.pool.html")
|
|||
|
.then((template)=>{
|
|||
|
LNProvider.routes.push(
|
|||
|
{
|
|||
|
path: "/ippool",
|
|||
|
label: "IP Pool",
|
|||
|
component: {
|
|||
|
props: {
|
|||
|
LNP: Object,
|
|||
|
},
|
|||
|
template: template,
|
|||
|
data: function(){
|
|||
|
return {
|
|||
|
allocationWidth: 64,
|
|||
|
targetCIDR: "",
|
|||
|
independentAllocation: false,
|
|||
|
allocationType: 0,
|
|||
|
allocationUsage: "",
|
|||
|
};
|
|||
|
},
|
|||
|
computed: {
|
|||
|
IPAllocations: ()=>LNP.IPAllocations,
|
|||
|
subnetWidth: {
|
|||
|
get: function(){
|
|||
|
return 128 - this.allocationWidth;
|
|||
|
},
|
|||
|
set: function(v){
|
|||
|
this.allocationWidth = 128 - v;
|
|||
|
},
|
|||
|
},
|
|||
|
},
|
|||
|
beforeRouteEnter: function(to,from,next){
|
|||
|
LNP.loadIPAllocations();
|
|||
|
next();
|
|||
|
},
|
|||
|
},
|
|||
|
}
|
|||
|
);
|
|||
|
resolve();
|
|||
|
});
|
|||
|
})
|
|||
|
);
|