identityservice.js 675 B

123456789101112131415161718192021222324252627282930
  1. var app = angular.module('sentinelDashboardApp');
  2. app.service('IdentityService', ['$http', function ($http) {
  3. this.fetchIdentityOfMachine = function (ip, port, searchKey) {
  4. var param = {
  5. ip: ip,
  6. port: port,
  7. searchKey: searchKey
  8. };
  9. return $http({
  10. url: 'resource/machineResource.json',
  11. params: param,
  12. method: 'GET'
  13. });
  14. };
  15. this.fetchClusterNodeOfMachine = function (ip, port, searchKey) {
  16. var param = {
  17. ip: ip,
  18. port: port,
  19. type: 'cluster',
  20. searchKey: searchKey
  21. };
  22. return $http({
  23. url: 'resource/machineResource.json',
  24. params: param,
  25. method: 'GET'
  26. });
  27. };
  28. }]);