Merge "Add Storm Job to UI"

This commit is contained in:
Jenkins 2015-08-28 11:19:40 +00:00 committed by Gerrit Code Review
commit 3a72687ab3
6 changed files with 8 additions and 4 deletions

View File

@ -9,6 +9,7 @@
<li>{% blocktrans %}Pig{% endblocktrans %}</li>
<li>{% blocktrans %}Hive{% endblocktrans %}</li>
<li>{% blocktrans %}Spark{% endblocktrans %}</li>
<li>{% blocktrans %}Storm{% endblocktrans %}</li>
<li>{% blocktrans %}MapReduce{% endblocktrans %}</li>
<li>{% blocktrans %}Java Action{% endblocktrans %}</li>
<li>{% blocktrans %}Shell Action{% endblocktrans %}</li>

View File

@ -137,7 +137,7 @@
if ($.inArray(job_type, ["Hive", "Pig", "Shell"]) != -1) {
res.push("params");
}
if ($.inArray(job_type, ["Java", "Pig", "Spark", "Shell"]) != -1) {
if ($.inArray(job_type, ["Java", "Pig", "Spark", "Shell", "Storm"]) != -1) {
res.push("args_array");
}
return res;
@ -155,7 +155,7 @@
}
function hide_unnecessary_fields() {
if ($.inArray(job_type, ["Java", "Spark", "Shell"]) != -1) {
if ($.inArray(job_type, ["Java", "Spark", "Shell", "Storm"]) != -1) {
$("[name=job_input]").closest(".form-group").hide();
$("[name=job_output]").closest(".form-group").hide();
}

View File

@ -92,6 +92,7 @@ class GeneralConfigAction(workflows.Action):
'data-jobtype-hive': _("Choose a main binary"),
'data-jobtype-shell': _("Choose a shell script"),
'data-jobtype-spark': _("Choose a main binary"),
'data-jobtype-storm': _("Choose a main binary"),
'data-jobtype-mapreduce.streaming': _("Choose a main binary")
}))

View File

@ -296,7 +296,7 @@ class JobConfig(workflows.Step):
context["job_config"] = {"configs": job_config}
context["job_config"]["args"] = job_args_array
if job_type in ["Java", "Spark"]:
if job_type in ["Java", "Spark", "Storm"]:
context["job_config"]["configs"][JobConfigAction.MAIN_CLASS] = (
data.get("main_class", ""))
context["job_config"]["configs"][JobConfigAction.JAVA_OPTS] = (

View File

@ -126,6 +126,7 @@ class Helpers(object):
JOB_TYPE_MAP = {"pig": [_("Pig"), "Pig"],
"hive": [_("Hive"), "Hive"],
"spark": [_("Spark"), "Spark"],
"storm": [_("Storm"), "Storm"],
"mapreduce": [_("MapReduce"), "MapReduce"],
"mapreduce.streaming": [_("Streaming MapReduce"),
"MapReduce.Streaming"],

View File

@ -64,7 +64,8 @@ class JobExecutionGuideView(horizon_views.APIView):
def show_data_sources(self):
try:
if self.request.session["guide_job_type"] in ["Spark", "Java"]:
if self.request.session["guide_job_type"] in ["Spark", "Storm",
"Java"]:
return False
return True
except Exception: