var module = angular.module('app', []); function translogCtrl($scope, $http) { $scope.getData = function() { var file = $scope.file; $http.get('http://localhost:9200/_translog', { params : { file : file, size : 12 } }).success(function(data, status, headers, config) { $scope.itemList = data; $scope.view = function(id) { var item = $scope.itemList[id]; $scope.editItem = item; try { $('#prettyJson').html( pretty.parse (eval("(" + item.source + ")"))); } catch (error) { $('#prettyJson').html(pretty.error (error)); } $('#editPanel').modal('show'); } }).error(function(data, status, headers, config) { console.info(data); }); } }
然后我们复制应用到 plugins\translogView\_site 下面就可以了。我们也可以补充插件描述文件_site\es-plugin.properties
description=view translog
浏览器里输入
http://localhost:9200/_nodes?all=true
可以看到我们的插件已经安装成功,描述信息也有了。
到此,关于“elasticsearch的site插件怎么使用”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联网站,小编会继续努力为大家带来更多实用的文章!