Repository: incubator-metron Updated Branches: refs/heads/Metron_0.1BETA 634327763 -> c136b1d67
METRON-79 PcapService is hanging when called from the UI (merrimanr via cestella) closes apache/incubator-metron#54 Project: http://git-wip-us.apache.org/repos/asf/incubator-metron/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-metron/commit/c136b1d6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-metron/tree/c136b1d6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-metron/diff/c136b1d6 Branch: refs/heads/Metron_0.1BETA Commit: c136b1d675a3d8ba635a34a650597a8cdcbba564 Parents: 6343277 Author: merrimanr <merrim...@gmail.com> Authored: Mon Mar 21 16:45:19 2016 -0400 Committer: cstella <ceste...@gmail.com> Committed: Mon Mar 21 16:45:19 2016 -0400 ---------------------------------------------------------------------- .../roles/metron_pcapservice/defaults/main.yml | 24 ++++++++++++++++++++ .../metron_pcapservice/tasks/pcapservice.yml | 4 +++- .../roles/metron_pcapservice/vars/main.yml | 23 ------------------- .../lib/public/app/panels/pcap/module.html | 2 +- 4 files changed, 28 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/c136b1d6/deployment/roles/metron_pcapservice/defaults/main.yml ---------------------------------------------------------------------- diff --git a/deployment/roles/metron_pcapservice/defaults/main.yml b/deployment/roles/metron_pcapservice/defaults/main.yml new file mode 100644 index 0000000..0dbca48 --- /dev/null +++ b/deployment/roles/metron_pcapservice/defaults/main.yml @@ -0,0 +1,24 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--- +metron_version: 0.1BETA +metron_directory: /usr/metron/{{ metron_version }} +pcapservice_jar_name: Metron-Pcap_Service-{{ metron_version }}-jar-with-dependencies.jar +pcapservice_jar_src: "{{ playbook_dir }}/../../metron-streaming/Metron-Pcap_Service/target/{{ pcapservice_jar_name }}" +pcapservice_jar_dst: "{{ metron_directory }}/lib/{{ pcapservice_jar_name }}" +pcapservice_port: 8081 +hbase_config_path: "/etc/hbase/conf" http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/c136b1d6/deployment/roles/metron_pcapservice/tasks/pcapservice.yml ---------------------------------------------------------------------- diff --git a/deployment/roles/metron_pcapservice/tasks/pcapservice.yml b/deployment/roles/metron_pcapservice/tasks/pcapservice.yml index 4637311..651f7fb 100644 --- a/deployment/roles/metron_pcapservice/tasks/pcapservice.yml +++ b/deployment/roles/metron_pcapservice/tasks/pcapservice.yml @@ -27,7 +27,9 @@ dest: "{{ pcapservice_jar_dst }}" - name: Add hbase-site.xml to pcapservice jar - shell: "jar -uf {{ pcapservice_jar_dst }} /etc/hbase/conf/hbase-site.xml" + shell: "jar -uf {{ pcapservice_jar_dst }} hbase-site.xml" + args: + chdir: "{{ hbase_config_path }}" - name: Install service script template: src=pcapservice dest=/etc/init.d/pcapservice mode=0755 http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/c136b1d6/deployment/roles/metron_pcapservice/vars/main.yml ---------------------------------------------------------------------- diff --git a/deployment/roles/metron_pcapservice/vars/main.yml b/deployment/roles/metron_pcapservice/vars/main.yml deleted file mode 100644 index fdcd6f2..0000000 --- a/deployment/roles/metron_pcapservice/vars/main.yml +++ /dev/null @@ -1,23 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---- -metron_version: 0.1BETA -metron_directory: /usr/metron/{{ metron_version }} -pcapservice_jar_name: Metron-Pcap_Service-{{ metron_version }}-jar-with-dependencies.jar -pcapservice_jar_src: "{{ playbook_dir }}/../../metron-streaming/Metron-Pcap_Service/target/{{ pcapservice_jar_name }}" -pcapservice_jar_dst: "{{ metron_directory }}/lib/{{ pcapservice_jar_name }}" -pcapservice_port: 8081 http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/c136b1d6/metron-ui/lib/public/app/panels/pcap/module.html ---------------------------------------------------------------------- diff --git a/metron-ui/lib/public/app/panels/pcap/module.html b/metron-ui/lib/public/app/panels/pcap/module.html index 17c57e0..eaf1572 100755 --- a/metron-ui/lib/public/app/panels/pcap/module.html +++ b/metron-ui/lib/public/app/panels/pcap/module.html @@ -125,7 +125,7 @@ <label class="small">Include Reverse Traffic</label><input type="checkbox" value="false" class="input-medium" ng-model="include_reverse_traffic"></input> </div> <div class="edit-option"> - <button type="button" class="btn btn-success" ng-click="getPcap()">Search</button> + <button type="button" class="btn btn-success" ng-show="ip_src_addr && ip_dst_addr && ip_protocol && ip_src_port && dst_port" ng-click="getPcap()">Search</button> </div> </form>