mirror of
https://github.com/hak5/nano-tetra-modules.git
synced 2025-10-29 16:58:09 +00:00
Add modules to repository
This commit is contained in:
34
MACInfo/js/module.js
Normal file
34
MACInfo/js/module.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/* This is our AngularJS controller, called "MACInfo". */
|
||||
registerController('MACInfo', ['$api', '$scope', function($api, $scope) {
|
||||
$scope.company = "";
|
||||
$scope.macprefix = "";
|
||||
$scope.address = "";
|
||||
$scope.country = "";
|
||||
$scope.type = "";
|
||||
$scope.error = "";
|
||||
$scope.isLookupSuccess = false;
|
||||
$scope.isLookupFailure = false;
|
||||
$scope.moduleMAC = "";
|
||||
$scope.getMACInfo = (function() {
|
||||
$api.request({
|
||||
module:"MACInfo",
|
||||
action:"getMACInfo",
|
||||
moduleMAC: $scope.moduleMAC
|
||||
}, function(response){
|
||||
if(response.success == true){
|
||||
$scope.isLookupSuccess = true;
|
||||
$scope.isLookupFailure = false;
|
||||
$scope.company = response.company;
|
||||
$scope.macprefix = response.macprefix;
|
||||
$scope.address = response.address;
|
||||
$scope.country = response.country;
|
||||
$scope.type = response.type;
|
||||
}
|
||||
else{
|
||||
$scope.isLookupSuccess = false;
|
||||
$scope.isLookupFailure = true;
|
||||
$scope.error = response.error;
|
||||
}
|
||||
});
|
||||
});
|
||||
}]);
|
||||
Reference in New Issue
Block a user