Use the client API to load servers on the listing page
This commit is contained in:
parent
ad69193ac0
commit
6e5c365018
8 changed files with 98 additions and 9 deletions
19
resources/assets/scripts/models/allocation.js
Normal file
19
resources/assets/scripts/models/allocation.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
const Allocation = function () {
|
||||
this.ip = null;
|
||||
this.port = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return a new allocation model.
|
||||
*
|
||||
* @param obj
|
||||
* @returns {Allocation}
|
||||
*/
|
||||
Allocation.prototype.fill = function (obj) {
|
||||
this.ip = obj.ip || null;
|
||||
this.port = obj.port || null;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
export default Allocation;
|
Reference in a new issue