You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by db...@apache.org on 2016/10/27 19:04:16 UTC
[03/10] ambari git commit: AMBARI-18691. Improve and Update Workflow
designer to support coordinators and bundles. (Belliraj HB via dipayanb)
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/named-properties.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/named-properties.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/named-properties.hbs
index 2fa78bc..5750422 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/named-properties.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/named-properties.hbs
@@ -21,6 +21,6 @@
</label>
<div class="{{inputWidthClass}}">
{{input type="text" class="form-control" value=property.value placeholder="value"}}
- {{field-error error=errors.property.value}}
+ {{field-error model=this field='property.value' showErrorMessage=showErrorMessage}}
</div>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/pig-action-info.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/pig-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/pig-action-info.hbs
new file mode 100644
index 0000000..abc8cba
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/pig-action-info.hbs
@@ -0,0 +1,47 @@
+{{!
+* 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.
+}}
+<div id="notificationWidget" class="">
+ <!--a href="#" class="close " data-dismiss="alert" aria-label="close">×</a-->
+ <ul class="list-group">
+ <li class="list-group-item">{{info-header hoveredAction=hoveredAction hideNotification="hideNotification"}}</li>
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Name Node : </b><br/>{{hoveredAction.nameNode}}</li>{{/if}}
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Resource Manager : </b><br/>{{hoveredAction.jobTracker}} </li>{{/if}}
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Script : </b><br/>{{hoveredAction.script}}</li>{{/if}}
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Job xml : </b>
+ {{#property-value-config action=hoveredAction.jobXml}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Archives : </b>
+ {{#property-value-config action=hoveredAction.archives}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Files : </b>
+ {{#property-value-config action=hoveredAction.files}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Params : </b>
+ {{#property-value-config action=hoveredAction.params}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Args : </b>
+ {{#property-value-config action=hoveredAction.args}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Prepare : </b>
+ {{#prepare-config-info action=hoveredAction}}{{/prepare-config-info}}
+ </li>{{/if}}
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Configuration : </b>
+ {{#name-value-info action=hoveredAction}}{{/name-value-info}}
+ </li>{{/if}}
+ </ul>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/pig-action.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/pig-action.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/pig-action.hbs
index eb38432..d0fe490 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/pig-action.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/pig-action.hbs
@@ -26,7 +26,7 @@
<button class="btn btn-primary" type="button" {{action "openFileBrowser" "actionModel.script"}}>Browse</button>
</span>
</div>
- {{#field-error error=errors.actionModel.script}}{{/field-error}}
+ {{field-error model=this field='actionModel.script' showErrorMessage=showErrorMessage}}
</div>
</div>
{{#jobxml-config jobXml=actionModel.jobXml openFileBrowser="openFileBrowser" register="register"}}{{/jobxml-config}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/prepare-config-fs.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/prepare-config-fs.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/prepare-config-fs.hbs
index 9d712bf..c549a26 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/prepare-config-fs.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/prepare-config-fs.hbs
@@ -36,51 +36,7 @@
<input class="form-control btn btn-danger" type="button" {{action "deletePrepare" index}} value="-">
</div>
</div>
- {{#if (eq prep.type "mkdir")}}
- <div class="form-group bottom-margin-zero">
- <label class="control-label col-xs-2">Path</label>
- <div class="col-xs-7">
- <div class="input-group">
- {{input type="text" class="form-control" value=prep.settings.path placeholder="path of the directory"}}
- <span class="input-group-btn">
- <button class="btn btn-primary" type="button" {{action "openFileBrowserForListItem" index "path"}}>Browse</button>
- </span>
- </div>
- </div>
- </div>
- {{#unless prep.settings.path}}
- <div class="form-group bottom-margin-zero">
- <label class="text-danger control-label col-xs-2">
- </label>
- <label class="text-danger control-label col-xs-4 rightAlign">
- Path is mandatory
- </label>
- </div>
- {{/unless}}
- {{/if}}
- {{#if (eq prep.type "delete")}}
- <div class="form-group bottom-margin-zero">
- <label class="control-label col-xs-2">Path</label>
- <div class="col-xs-7">
- <div class="input-group">
- {{input type="text" class="form-control" value=prep.settings.path placeholder="path of the directory"}}
- <span class="input-group-btn">
- <button class="btn btn-primary" type="button" {{action "openFileBrowserForListItem" index "path"}}>Browse</button>
- </span>
- </div>
- </div>
- </div>
- {{#unless prep.settings.path}}
- <div class="form-group bottom-margin-zero">
- <label class="text-danger control-label col-xs-2">
- </label>
- <label class="text-danger control-label col-xs-4 rightAlign">
- Path is mandatory
- </label>
- </div>
- {{/unless}}
- {{/if}}
- {{#if (eq prep.type "touchz")}}
+ {{#if (or (eq prep.type "delete") (eq prep.type "mkdir") (eq prep.type "touchz"))}}
<div class="form-group bottom-margin-zero">
<label class="control-label col-xs-2">Path</label>
<div class="col-xs-7">
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/prepare-config-info.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/prepare-config-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/prepare-config-info.hbs
new file mode 100644
index 0000000..866e6b9
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/prepare-config-info.hbs
@@ -0,0 +1,22 @@
+{{!
+* 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.
+}}
+{{#each action.prepare as |obj|}}
+ <ul class="list-unstyled">
+ <li>Type : {{obj.type}}, Path : {{obj.path}}</li>
+ </ul>
+{{/each}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/preview-dialog.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/preview-dialog.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/preview-dialog.hbs
new file mode 100644
index 0000000..943c917
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/preview-dialog.hbs
@@ -0,0 +1,33 @@
+{{!
+* 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.
+}}
+<div id="previewModal" class="modal fade" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">×</button>
+ <h4 class="modal-title">{{title}}</h4>
+ </div>
+ <div class="modal-body">
+ <pre class="preview-xml">{{previewXml}}</pre>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ </div>
+ </div>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/property-value-config.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/property-value-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/property-value-config.hbs
new file mode 100644
index 0000000..1cd5b69
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/property-value-config.hbs
@@ -0,0 +1,22 @@
+{{!
+* 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.
+}}
+{{#each action as |obj|}}
+ <ul class="list-unstyled">
+ <li>{{obj.value}}</li>
+ </ul>
+{{/each}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/save-wf.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/save-wf.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/save-wf.hbs
new file mode 100644
index 0000000..65bac42
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/save-wf.hbs
@@ -0,0 +1,79 @@
+{{!
+* 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.
+}}
+<div class="modal fade" id="configureJob" role="dialog">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">×</button>
+ <h4 class="modal-title">Save Workflow</h4>
+ </div>
+ <div class="modal-body">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ {{#if alertType}}
+ <div id="error" class="alert alert-{{alertType}}">
+ <div>{{alertMessage}}</div>
+ <div>{{alertDetails}}</div>
+ {{#if isStackTraceAvailable}}
+ {{#if isStackTraceVisible}}
+ <a href="#" {{action "hideStackTrace"}}>Hide Log</a>
+ <div id="stackTrace">{{{stackTrace}}}</div>
+ {{/if}}
+ {{#unless isStackTraceVisible}}
+ <a href="#" {{action "showStackTrace"}}>Show Log</a>
+ {{/unless}}
+ {{/if}}
+ </div>
+ {{/if}}
+ <div class="row form-group">
+ <div class="col-xs-3">
+ <label class="control-label" for="{{type}}-path">{{displayName}} path</label><span class="requiredField"> *</span>
+ </div>
+ <div class="col-xs-8">
+ <div class="input-group">
+ {{input class="form-control" type="text" name="{{type}}-path" value=filePath}}
+ <span class="input-group-btn">
+ <button type="button" class="btn btn-primary" {{action "selectFile"}}>Browse</button>
+ </span>
+ </div>
+ {{field-error model=this field='filePath' showErrorMessage=showErrorMessage}}
+ {{input type="checkbox" checked=overwritePath}}Overwrite
+ {{#if overwritePath}}
+ <div class="alert alert-info">
+ Sending overwrite option will replace the existing file in hdfs file system.
+ </div>
+ {{/if}}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ {{#if savingInProgress}}
+ {{spin-spinner lines=10 length=10 width=5 radius=10 }}
+ <span class="pull-left">Saving {{displayName}}</span>
+ {{/if}}
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ <button type="button" class="btn btn-primary" {{action "saveWorkflow"}}>Submit</button>
+ </div>
+ </div>
+ </div>
+</div>
+{{#if showingFileBrowser}}
+{{hdfs-browser closeFileBrowser="closeFileBrowser" selectFileCallback=selectFileCallback filePath=filePath}}
+{{/if}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/shell-action-info.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/shell-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/shell-action-info.hbs
new file mode 100644
index 0000000..332852c
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/shell-action-info.hbs
@@ -0,0 +1,48 @@
+{{!
+* 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.
+}}
+<div id="notificationWidget" class="">
+ <!--a href="#" class="close " data-dismiss="alert" aria-label="close">×</a-->
+ <ul class="list-group">
+ <li class="list-group-item">{{info-header hoveredAction=hoveredAction hideNotification="hideNotification"}}</li>
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Name Node : </b><br/>{{hoveredAction.nameNode}}</li>{{/if}}
+ {{#if hoveredAction.jobTracker}}<li class="list-group-item"><b>Resource Manager :</b> <br/>{{hoveredAction.jobTracker}} </li>{{/if}}
+ {{#if hoveredAction.exec}}<li class="list-group-item"><b>Exec : </b><br/>{{hoveredAction.exec}}</li>{{/if}}
+ {{#if hoveredAction.envVar}}<li class="list-group-item"><b>Env Var : </b>
+ {{#property-value-config action=hoveredAction.envVar}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.captureOutput}}<li class="list-group-item"><b>Capture Output : </b><br/>{{hoveredAction.captureOutput}}</li>{{/if}}
+ {{#if hoveredAction.jobXml}}<li class="list-group-item"><b>Job xml : </b>
+ {{#property-value-config action=hoveredAction.jobXml}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.archives}}<li class="list-group-item"><b>Archives : </b>
+ {{#property-value-config action=hoveredAction.archives}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.files}}<li class="list-group-item"><b>Files : </b>
+ {{#property-value-config action=hoveredAction.files}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.args}}<li class="list-group-item"><b>Args : </b>
+ {{#property-value-config action=hoveredAction.args}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.prepare}}<li class="list-group-item"><b>Prepare : </b>
+ {{#prepare-config-info action=hoveredAction}}{{/prepare-config-info}}
+ </li>{{/if}}
+ {{#if hoveredAction.configuration.property}}<li class="list-group-item"><b>Configuration : </b>
+ {{#name-value-info action=hoveredAction}}{{/name-value-info}}
+ </li>{{/if}}
+ </ul>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/shell-action.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/shell-action.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/shell-action.hbs
index 81d2c52..4673c732 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/shell-action.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/shell-action.hbs
@@ -27,7 +27,7 @@
<button class="btn btn-primary" type="button" {{action "openFileBrowser" "actionModel.exec"}}>Browse</button>
</span>
</div>
- {{#field-error error=errors.actionModel.exec}}{{/field-error}}
+ {{field-error model=this field='actionModel.exec' showErrorMessage=showErrorMessage}}
</div>
</div>
@@ -63,7 +63,7 @@
<div class="col-xs-7">
{{input type="text" class="form-control" name="job-tracker" value=actionModel.jobTracker placeholder="Resource Manager"}}
</div>
- {{field-error error=errors.actionModel.jobTracker}}
+ {{field-error model=this field='actionModel.jobTracker' showErrorMessage=showErrorMessage}}
</div>
<div class="form-group">
<label for="inputPassword" class="control-label col-xs-2">Name node</label>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sla-info.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sla-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sla-info.hbs
index e304f80..28bdf15 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sla-info.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sla-info.hbs
@@ -16,11 +16,11 @@
* limitations under the License.
}}
<div class="panel panel-default">
- <div class="panel-heading" id="sla-accordion" data-toggle="collapse" data-parent="#sla-accordion" data-target="#slaCollapse">
+ <div class="panel-heading" id="sla-accordion" data-toggle="collapse" data-parent="#sla-accordion" data-target="#{{collapseId}}">
SLA <span class="grayed">({{if slaEnabled "Enabled" "Disabled"}})</span>
<i class="indicator glyphicon glyphicon-chevron-down pull-right"></i>
</div>
- <div id="slaCollapse" class="panel-collapse collapse panel-body">
+ <div id="{{collapseId}}" class="panel-collapse collapse panel-body">
<div class="form-group">
<label class="control-label col-xs-2">Enabled</label>
<span class="col-xs-2 paddingtop7">{{input type="checkbox" checked=slaEnabled}}</span>
@@ -28,14 +28,15 @@
<div class="form-group">
<label class="control-label col-xs-2 padding10">Nominal Time<span class="requiredField"> *</span></label>
<div class="col-xs-3 padding10">
- {{input type="text" id="nominalTime" title="Date in UTC Format" class="form-control" value=nominalTime placeholder="Nominal Time"}}
+ {{input type="text" name="nominalTime" title="Date in UTC Format" class="form-control" value=nominalTime placeholder="Nominal Time"}}
+ {{field-error model=this field='nominalTime' showErrorMessage=showErrorMessage}}
</div>
- {{field-error error=errors.nominalTime}}
</div>
<div class="form-group">
<label class="control-label col-xs-2">Should Start</label>
<div class="col-xs-3">
{{input class="form-control" type="text" value=slaInfo.shouldStart.time placeholder="Should Start"}}
+ {{field-error model=this field='slaInfo.shouldStart.time' showErrorMessage=showErrorMessage}}
</div>
<div class="col-xs-2">
<select class="form-control" name="time-unit" title="Time Unit" onchange={{action (mut slaInfo.shouldStart.unit) value="target.value"}}>
@@ -43,14 +44,14 @@
<option value={{timeUnit.value}} selected={{eq timeUnit.value slaInfo.shouldStart.unit}}>{{timeUnit.displayName}}</option>
{{/each}}
</select>
- {{field-error error=errors.shouldStart.unit}}
+ {{field-error model=this field='slaInfo.shouldStart.unit' showErrorMessage=showErrorMessage}}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-2">Should End<span class="requiredField"> *</span></label>
<div class="col-xs-3">
{{input class="form-control" type="text" value=slaInfo.shouldEnd.time placeholder="Should End"}}
- {{field-error error=errors.shouldEnd.time}}
+ {{field-error model=this field='slaInfo.shouldEnd.time' showErrorMessage=showErrorMessage}}
</div>
<div class="col-xs-2">
<select class="form-control" name="time-unit" title="Time Unit" onchange={{action (mut slaInfo.shouldEnd.unit) value="target.value"}}>
@@ -58,7 +59,7 @@
<option value={{timeUnit.value}} selected={{eq timeUnit.value slaInfo.shouldEnd.unit}}>{{timeUnit.displayName}}</option>
{{/each}}
</select>
- {{field-error error=errors.shouldEnd.unit}}
+ {{field-error model=this field='slaInfo.shouldEnd.unit' showErrorMessage=showErrorMessage}}
</div>
</div>
<div class="form-group">
@@ -72,7 +73,7 @@
<option value={{timeUnit.value}} selected={{eq timeUnit.value slaInfo.maxDuration.unit}}>{{timeUnit.displayName}}</option>
{{/each}}
</select>
- {{field-error error=errors.maxDuration.unit}}
+ {{field-error model=this field='slaInfo.maxDuration.unit' showErrorMessage=showErrorMessage}}
</div>
</div>
<div class="form-group">
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/spark-action-info.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/spark-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/spark-action-info.hbs
new file mode 100644
index 0000000..1b4274f
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/spark-action-info.hbs
@@ -0,0 +1,46 @@
+{{!
+* 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.
+}}
+<div id="notificationWidget" class="">
+ <!--a href="#" class="close " data-dismiss="alert" aria-label="close">×</a-->
+ <ul class="list-group">
+ <li class="list-group-item">{{info-header hoveredAction=hoveredAction hideNotification="hideNotification"}}</li>
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Name Node : </b><br/>{{hoveredAction.nameNode}}</li>{{/if}}
+ {{#if hoveredAction.jobTracker}}<li class="list-group-item"><b>Resource Manager : </b><br/>{{hoveredAction.jobTracker}} </li>{{/if}}
+ {{#if hoveredAction.class}}<li class="list-group-item"><b>Class : </b><br/>{{hoveredAction.class}} </li>{{/if}}
+ {{#if hoveredAction.jar}}<li class="list-group-item"><b>Jar : </b><br/>{{hoveredAction.jar}} </li>{{/if}}
+ {{#if hoveredAction.master}}<li class="list-group-item"><b>Master : </b><br/>{{hoveredAction.master}} </li>{{/if}}
+ {{#if hoveredAction.args}}<li class="list-group-item"><b>Args : </b>
+ {{#property-value-config action=hoveredAction.args}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.jobXml}}<li class="list-group-item"><b>Job xml : </b>
+ {{#property-value-config action=hoveredAction.jobXml}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.archives}}<li class="list-group-item"><b>Archives : </b>
+ {{#property-value-config action=hoveredAction.archives}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.files}}<li class="list-group-item"><b>Files : </b>
+ {{#property-value-config action=hoveredAction.files}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.prepare}}<li class="list-group-item"><b>Prepare : </b>
+ {{#prepare-config-info action=hoveredAction}}{{/prepare-config-info}}
+ </li>{{/if}}
+ {{#if hoveredAction.configuration.property}}<li class="list-group-item"><b>Configuration : </b>
+ {{#name-value-info action=hoveredAction}}{{/name-value-info}}
+ </li>{{/if}}
+ </ul>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/spark-action.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/spark-action.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/spark-action.hbs
index 7472995..52bdad5 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/spark-action.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/spark-action.hbs
@@ -22,7 +22,7 @@
<label for="inputPassword" class="control-label col-xs-2">Name<span class="requiredField"> *</span></label>
<div class="col-xs-7">
{{input type="text" class="form-control" name="spark-name" value=actionModel.sparkName placeholder="Spark Name"}}
- {{#field-error error=errors.actionModel.sparkName}}{{/field-error}}
+ {{field-error model=this field='actionModel.sparkName' showErrorMessage=showErrorMessage}}
</div>
</div>
<div class="form-group">
@@ -35,7 +35,7 @@
<button class="btn btn-primary" type="button" {{action "openFileBrowser" "actionModel.jar"}}>Browse</button>
</span>
</div>
- {{#field-error error=errors.actionModel.jar}}{{/field-error}}
+ {{field-error model=this field='actionModel.jar' showErrorMessage=showErrorMessage}}
</div>
</div>
{{#if isJar}}
@@ -63,7 +63,7 @@
<input type=text placeholder="Custom" disabled={{disableCustomMaster}} value={{customMaster}} onchange={{action (mut actionModel.master) value="target.value"}}>
</div>
</div>
- {{#field-error error=errors.actionModel.master}}{{/field-error}}
+ {{field-error model=this field='actionModel.master' showErrorMessage=showErrorMessage}}
</div>
<div class="form-group">
<label for="inputEmail" class="control-label col-xs-2">Spark Options</label>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sqoop-action-info.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sqoop-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sqoop-action-info.hbs
new file mode 100644
index 0000000..eb4c31c
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sqoop-action-info.hbs
@@ -0,0 +1,41 @@
+{{!
+* 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.
+}}
+<div id="notificationWidget" class="">
+ <!--a href="#" class="close " data-dismiss="alert" aria-label="close">×</a-->
+ <ul class="list-group">
+ <li class="list-group-item">{{info-header hoveredAction=hoveredAction hideNotification="hideNotification"}}</li>
+ {{#if hoveredAction.nameNode}}<li class="list-group-item"><b>Name Node : </b><br/>{{hoveredAction.nameNode}}</li>{{/if}}
+ {{#if hoveredAction.jobTracker}}<li class="list-group-item"><b>Resource Manager :</b> <br/>{{hoveredAction.jobTracker}} </li>{{/if}}
+ {{#if hoveredAction.command}}<li class="list-group-item"><b>Command : </b><br/>{{hoveredAction.command}}</li>{{/if}}
+ {{#if hoveredAction.jobXml}}<li class="list-group-item"><b>Job xml : </b>
+ {{#property-value-config action=hoveredAction.jobXml}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.archives}}<li class="list-group-item"><b>Archives : </b>
+ {{#property-value-config action=hoveredAction.archives}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.files}}<li class="list-group-item"><b>Files : </b>
+ {{#property-value-config action=hoveredAction.files}}{{/property-value-config}}
+ </li>{{/if}}
+ {{#if hoveredAction.prepare}}<li class="list-group-item"><b>Prepare : </b>
+ {{#prepare-config-info action=hoveredAction}}{{/prepare-config-info}}
+ </li>{{/if}}
+ {{#if hoveredAction.configuration.property}}<li class="list-group-item"><b>Configuration : </b>
+ {{#name-value-info action=hoveredAction}}{{/name-value-info}}
+ </li>{{/if}}
+ </ul>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/ssh-action-info.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/ssh-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/ssh-action-info.hbs
new file mode 100644
index 0000000..3e5c363
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/ssh-action-info.hbs
@@ -0,0 +1,32 @@
+{{!
+* 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.
+}}
+<div id="notificationWidget" class="">
+ <!--a href="#" class="close " data-dismiss="alert" aria-label="close">×</a-->
+ <ul class="list-group">
+ <li class="list-group-item">{{info-header hoveredAction=hoveredAction hideNotification="hideNotification"}}</li>
+ {{#if hoveredAction.host}}<li class="list-group-item"><b>Host : </b> <br/>{{hoveredAction.host}} </li>{{/if}}
+ {{#if hoveredAction.host}}<li class="list-group-item"><b>Command : </b><br/>{{hoveredAction.command}} </li>{{/if}}
+ {{#if hoveredAction.host}}<li class="list-group-item"><b>Capture Output : </b> <br/>{{hoveredAction.captureOutput}} </li>{{/if}}
+ {{#if hoveredAction.host}}<li class="list-group-item"><b>Arg : </b> <br/>{{hoveredAction.arg}} </li>{{/if}}
+ {{#if hoveredAction.host}}<li class="list-group-item"><b>Args : </b>
+ {{#property-value-config action=hoveredAction.args}}{{/property-value-config}}
+ </li>{{/if}}
+ </ul>
+</div>
+
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/ssh-action.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/ssh-action.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/ssh-action.hbs
index 065e270..ab2ebb2 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/ssh-action.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/ssh-action.hbs
@@ -22,14 +22,14 @@
<label for="inputEmail" class="control-label col-xs-2">Host<span class="requiredField"> *</span></label>
<div class="col-xs-7">
{{input type="text" class="form-control" name="host" value=actionModel.host placeholder="localhost"}}
- {{field-error error=errors.actionModel.host}}
+ {{field-error model=this field='actionModel.host' showErrorMessage=showErrorMessage}}
</div>
</div>
<div class="form-group">
<label for="inputEmail" class="control-label col-xs-2">Command<span class="requiredField"> *</span></label>
<div class="col-xs-7">
{{input type="text" class="form-control" name="command" value=actionModel.command placeholder="command"}}
- {{field-error error=errors.actionModel.command}}
+ {{field-error model=this field='actionModel.command' showErrorMessage=showErrorMessage}}
</div>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sub-workflow-action-info.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sub-workflow-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sub-workflow-action-info.hbs
new file mode 100644
index 0000000..8b63c23
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sub-workflow-action-info.hbs
@@ -0,0 +1,29 @@
+{{!
+* 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.
+}}
+<div id="notificationWidget" class="">
+ <!--a href="#" class="close " data-dismiss="alert" aria-label="close">×</a-->
+ <ul class="list-group">
+ <li class="list-group-item"><b>The details are</b>
+ <a href="#" class="pull-right" {{action "hideNotification"}}>X</a></li>
+ {{#if hoveredAction.appPath}}<li class="list-group-item"><b>App Path : </b><br/>{{hoveredAction.appPath}}</li>{{/if}}
+ {{#if hoveredAction.propagate-configuration}}<li class="list-group-item"><b>Propagate Configuration : </b><br/>{{hoveredAction.propagate-configuration}}</li>{{/if}}
+ {{#if hoveredAction.configuration.property}}<li class="list-group-item"><b>Configuration : </b>
+ {{#name-value-info action=hoveredAction}}{{/name-value-info}}
+ </li>{{/if}}
+ </ul>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sub-workflow.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sub-workflow.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sub-workflow.hbs
index a1ffaba..2841188 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sub-workflow.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/sub-workflow.hbs
@@ -27,7 +27,7 @@
<button class="btn btn-primary" type="button" {{action "openFileBrowser" "actionModel.appPath"}}>Browse</button>
</span>
</div>
- {{#field-error error=errors.actionModel.appPath}}{{/field-error}}
+ {{field-error model=this field='actionModel.appPath' showErrorMessage=showErrorMessage}}
</div>
</div>
<div class="form-group">
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/transition-config.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/transition-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/transition-config.hbs
index 65902b3..fe46446 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/transition-config.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/transition-config.hbs
@@ -18,7 +18,7 @@
<div class="form-group">
<label class="control-label col-xs-2">Error To<span class="requiredField"> *</span></label>
<div class=" col-xs-7">
- <select onchange={{action "onSelectChange" value="target.value"}} name="select-node" class="form-control" data-show-icon="true">
+ <select onchange={{action "errorToHandler" value="target.value"}} name="select-node" class="form-control" data-show-icon="true">
<optgroup label="Kill Nodes"></optgroup>
{{#each killNodes as |node index|}}
<option value={{node.name}} selected={{eq node.name transition.errorNode.name}}>{{node.name}}</option>
@@ -28,13 +28,24 @@
<option value={{node.name}} selected={{eq node.name transition.errorNode.name}}>{{node.name}}</option>
{{/each}}
</select>
- {{field-error error=errors.errorNode.name}}
+ {{#if (eq transition.errorNode.type 'kill')}}
+ <span class="kill-message">{{transition.errorNode.killMessage}}</span>
+ {{/if}}
</div>
</div>
-<div class="form-group margin0">
- <label class="control-label col-xs-2">Ok To</label>
- <div class=" col-xs-7 paddingClass">
- {{okToNode.name}}
+<div class="form-group">
+ <label class="control-label col-xs-2">Ok To<span class="requiredField"> *</span></label>
+ <div class=" col-xs-7">
+ <select onchange={{action "okToHandler" value="target.value"}} name="select-node" class="form-control" data-show-icon="true">
+ {{#each currentNode.validOkToNodes as |node index|}}
+ <option value={{node.name}} selected={{eq node.name transition.okToNode.name}}>{{node.name}}</option>
+ {{/each}}
+ </select>
+ {{#if showWarning}}
+ <span class="ok-to-warning">
+ Changing Ok To transition may result in deletion of intermediate nodes. <span class="undo" {{action 'undoChangeOkTo'}}><u>Undo</u></span>
+ </span>
+ {{/if}}
</div>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs
index 337ad7d..145f81b 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/version-settings.hbs
@@ -25,7 +25,7 @@
<div class="modal-body">
<div class="row">
<div class="form-group">
- <label class="control-label col-xs-3"> Workflow Verion</label>
+ <label class="control-label col-xs-3"> Workflow Version</label>
<div class="col-xs-7">
<select onchange={{action (mut currentWorkflowVersion) value="target.value"}} name="select-version" class="form-control">
{{#each workflowSchemaVersions as |version index|}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-actions.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-actions.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-actions.hbs
index 8670161..7c883af 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-actions.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-actions.hbs
@@ -19,6 +19,7 @@
<span data-toggle="popover" title="Click on an Action to Insert"></span>
<div id="actions">
<div class="_actions_popup">
+ <div class="clearfix"></div>
<h4>Control Flow Nodes</h4>
<ul class="actions_list_left control_flow">
<li {{action 'addAction' 'fork'}} data-name="fork" data-type="fork" class="dr_action_fork _fork enabled"> <i class="fa fa-sitemap"></i> Fork </li>
@@ -26,6 +27,10 @@
</ul>
<div class="clearfix"></div>
<h4>Action Nodes</h4>
+ {{#if clipboardHasContents}}
+ <div><span class="paste-action">Paste from clipboard</span><span class="btn paste-action-btn" {{action 'pasteNode'}}><i class="fa fa-paste"></i></span></div>
+ {{/if}}
+ <div class="clearfix"></div>
<ul class="actions_list_left actionNodes">
<li {{action 'addAction' 'hive'}} class="dr_action enabled" data-name="Hive" data-type="hive"> <i class="fa fa-server"></i> Hive </li>
<li {{action 'addAction' 'hive2'}} class="dr_action enabled" data-name="Hive" data-type="hive2"> <i class="fa fa-server"></i> Hive2</li>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-config.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-config.hbs
index 1593165..d425bd0 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-config.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-config.hbs
@@ -35,7 +35,7 @@
{{/if}}
<div class="row form-group">
<div class="col-xs-3">
- <label class="control-label" for="Workflow Path">Workflow Path</label><span class="requiredField"> *</span>
+ <label class="control-label" for="Workflow Path">Workflow Pathdafxg</label><span class="requiredField"> *</span>
</div>
<div class="col-xs-8">
<div class="input-group">
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-credentials.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-credentials.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-credentials.hbs
index d0a2b43..464221f 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-credentials.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-credentials.hbs
@@ -26,14 +26,36 @@
<div class=" panel panel-default">
<div class="panel-heading">Credentials</div>
<div class="panel-body handlerPanel">
- {{#each credentialsList as |credential|}}
- {{#credentials-config showCredentials="showCredentials" delete="deleteCredentials" register="register" credential=credential mode="edit"}}{{/credentials-config}}
- {{else}}
- No Credentials
- {{/each}}
+ <div id="credential-action-bar" class="form-group pull-right">
+ <button id="dataset-create-btn" {{action 'createCredentials'}} type="button" class="btn btn-default">
+ <i class="fa fa-plus-circle"></i> Add
+ </button>
+ </div>
+ <div class="paddingtop10">
+ <ul class="list-group credential-list">
+ {{#each credentialsList as |credential index|}}
+ <li class="list-group-item">
+ {{credential.name}}<span class="cred-type">({{credential.type}})</span>
+ <span class="pull-right">
+ <i class="fa fa-trash-o" title="Delete" {{action "deleteCredentials" index bubbles=false}}></i>
+ </span>
+ <span class="pull-right paddingright10">
+ <i class="fa fa-pencil" title="Edit" {{action "editCredentials" index bubbles=false}}></i>
+ </span>
+ </li>
+ {{else}}
+ <span>No Credentials Configured.</span>
+ {{/each}}
+ </ul>
+ </div>
</div>
</div>
- {{#credentials-config showCredentials="showCredentials" add="addCredentials" mode="create"}}{{/credentials-config}}
+ {{#if createMode}}
+ {{#credentials-config credential=currentCredentials showCredentials="showCredentials" add="addCredentials" mode="create" cancel="cancelCreateMode"}}{{/credentials-config}}
+ {{/if}}
+ {{#if editMode}}
+ {{#credentials-config credential=currentCredentials showCredentials="showCredentials" update="updateCredentials" mode="edit" cancel="cancelEditMode"}}{{/credentials-config}}
+ {{/if}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action-info.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action-info.hbs
new file mode 100644
index 0000000..8d1e09c
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-action-info.hbs
@@ -0,0 +1,80 @@
+{{!
+* 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.
+}}
+
+<div id="actionInfo">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <div class="col-md-12">
+ <div class="col-md-2">Name</div>
+ <div class="col-md-10">{{actionInfo.name}}</div>
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">Type</div>
+ <div class="col-md-10">{{actionInfo.type}}</div>
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">Transition</div>
+ <div class="col-md-10">{{actionInfo.transition}}</div>
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">Start Time</div>
+ <div class="col-md-10">{{actionInfo.startTime}}</div>
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">End Time</div>
+ <div class="col-md-10">{{actionInfo.endTime}}</div>
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">Status</div>
+ <div class="col-md-10">{{actionInfo.status}}</div>
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">Error Code</div>
+ <div class="col-md-10">{{actionInfo.errorCode}}</div>
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">Error Message</div>
+ <div class="col-md-10">{{actionInfo.errorMessage}}</div>
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">External ID</div>
+ <div class="col-md-10">{{actionInfo.externalId}}</div>
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">External Status</div>
+ <div class="col-md-10">{{actionInfo.externalStatus}}</div>
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">Console URL</div>
+ {{#unless (eq "-" actionInfo.consoleUrl)}}
+ <div class="col-md-10"><a target="_blank" href="{{actionInfo.consoleUrl}}">{{actionInfo.consoleUrl}}</a></div>
+ {{else}}
+ <div class="col-md-10">{{actionInfo.consoleUrl}}</div>
+ {{/unless}}
+ </div>
+ <div class="col-md-12">
+ <div class="col-md-2">Tracker URI</div>
+ {{#unless (eq "-" actionInfo.trackerUri)}}
+ <div class="col-md-10"><a target="_blank" href="{{actionInfo.trackerUri}}">{{actionInfo.trackerUri}}</a></div>
+ {{else}}
+ <div class="col-md-10">{{actionInfo.trackerUri}}</div>
+ {{/unless}}
+ </div>
+ </div>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
index 6465ca8..5b33c41 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-job-details.hbs
@@ -106,67 +106,11 @@
<li role="presentation"><a href="#actionConf" aria-controls="action-conf" role="tab" data-toggle="tab">Configuration</a></li>
</ul>
<div class="tab-content">
- <div role="tabpanel" class="tab-pane active" id="actionInfo">
- <div class="panel panel-default">
- <div class="panel-body">
- <div class="col-md-12">
- <div class="col-md-2">Name</div>
- <div class="col-md-10">{{model.actionDetails.name}}</div>
- </div>
- <div class="col-md-12">
- <div class="col-md-2">Type</div>
- <div class="col-md-10">{{model.actionDetails.type}}</div>
- </div>
- <div class="col-md-12">
- <div class="col-md-2">Transition</div>
- <div class="col-md-10">{{model.actionDetails.transition}}</div>
- </div>
- <div class="col-md-12">
- <div class="col-md-2">Start Time</div>
- <div class="col-md-10">{{model.actionDetails.startTime}}</div>
- </div>
- <div class="col-md-12">
- <div class="col-md-2">End Time</div>
- <div class="col-md-10">{{model.actionDetails.endTime}}</div>
- </div>
- <div class="col-md-12">
- <div class="col-md-2">Status</div>
- <div class="col-md-10">{{model.actionDetails.status}}</div>
- </div>
- <div class="col-md-12">
- <div class="col-md-2">Error Code</div>
- <div class="col-md-10">{{model.actionDetails.errorCode}}</div>
- </div>
- <div class="col-md-12">
- <div class="col-md-2">Error Message</div>
- <div class="col-md-10">{{model.actionDetails.errorMessage}}</div>
- </div>
- <div class="col-md-12">
- <div class="col-md-2">External ID</div>
- <div class="col-md-10">{{model.actionDetails.externalId}}</div>
- </div>
- <div class="col-md-12">
- <div class="col-md-2">External Status</div>
- <div class="col-md-10">{{model.actionDetails.externalStatus}}</div>
- </div>
- <div class="col-md-12">
- <div class="col-md-2">Console URL</div>
- {{#unless (eq "-" model.actionDetails.consoleUrl)}}
- <div class="col-md-10"><a target="_blank" href="{{model.actionDetails.consoleUrl}}">{{model.actionDetails.consoleUrl}}</a></div>
- {{else}}
- <div class="col-md-10">{{model.actionDetails.consoleUrl}}</div>
- {{/unless}}
- </div>
- <div class="col-md-12">
- <div class="col-md-2">Tracker URI</div>
- {{#unless (eq "-" model.actionDetails.trackerUri)}}
- <div class="col-md-10"><a target="_blank" href="{{model.actionDetails.trackerUri}}">{{model.actionDetails.trackerUri}}</a></div>
- {{else}}
- <div class="col-md-10">{{model.actionDetails.trackerUri}}</div>
- {{/unless}}
- </div>
- </div>
- </div>
+ <div role="tabpanel" class="tab-pane active">
+ {{#if model.actionDetails}}
+ {{#workflow-job-action-info actionInfo=model.actionDetails}}
+ {{/workflow-job-action-info}}
+ {{/if}}
</div>
<div role="tabpanel" class="tab-pane" id="actionConf">
<div class="panel panel-default">
@@ -191,7 +135,22 @@
<div role="tabpanel" class="tab-pane" id="jobConfig">
<div class="panel panel-default">
<div class="panel-body preview">
- <pre class="prettyprint">{{model.conf}}</pre>
+ <table class="table table-striped configuration-property-table">
+ <thead>
+ <tr>
+ <th class="propertyName">Name</th>
+ <th class="propertyValue">Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#each model.configurationProperties as |configurationProperty|}}
+ <tr>
+ <td class="propertyName">{{configurationProperty.name}}</td>
+ <td class="propertyValue">{{configurationProperty.value}}</td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
</div>
</div>
</div>
@@ -203,11 +162,11 @@
<div class="panel panel-default">
<div class="panel-body preview">
{{#if model.errorLog}}
- <pre>{{model.errorLog}}</pre>
+ <pre>{{model.errorLog}}</pre>
{{else if model.error}}
- <pre>{{model.errorLog}}</pre>
+ <pre>{{model.errorLog}}</pre>
{{else}}
- {{spin-spinner lines=8 length=5 width=3 radius=5 top=220}}
+ {{spin-spinner lines=8 length=5 width=3 radius=5 top=220}}
{{/if}}
</div>
</div>
@@ -216,11 +175,11 @@
<div class="panel panel-default">
<div class="panel-body preview">
{{#if model.auditLog}}
- <pre>{{model.auditLog}}</pre>
+ <pre>{{model.auditLog}}</pre>
{{else if model.error}}
- <pre>{{model.auditLog}}</pre>
+ <pre>{{model.auditLog}}</pre>
{{else}}
- {{spin-spinner lines=8 length=5 width=3 radius=5 top=220}}
+ {{spin-spinner lines=8 length=5 width=3 radius=5 top=220}}
{{/if}}
</div>
</div>
@@ -228,7 +187,68 @@
<div role="tabpanel" class="tab-pane" id="jobDag">
<div class="panel panel-default">
<div class="panel-body">
- <img src={{dagUrl}} />
+ <!-- <img src={{dagUrl}} /> -->
+ <div class="row">
+ <div class="col-xs-8">
+ <div id="cy" class="cy-panel"></div>
+ </div>
+ <div class="col-xs-4">
+ {{#if model.nodeName}}
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <div class="row">
+ <div class="col-md-4 text-bold">Name</div>
+ <div class="col-md-8">{{model.nodeName}}</div>
+ </div>
+ <div class="row">
+ <div class="col-md-4 text-bold">Type</div>
+ <div class="col-md-8">{{model.nodeType}}</div>
+ </div>
+ {{#if model.actionInfo}}
+ <div class="row">
+ <div class="col-md-4 text-bold">Status</div>
+ <div class="col-md-8">{{model.actionInfo.status}}</div>
+ </div>
+ <div class="row">
+ <div class="col-md-4 text-bold">Start Time</div>
+ <div class="col-md-8">{{model.actionInfo.startTime}}</div>
+ </div>
+ <div class="row">
+ <div class="col-md-4 text-bold">End Time</div>
+ <div class="col-md-8">{{model.actionInfo.endTime}}</div>
+ </div>
+ <div class="row pull-right" {{action 'getActionDetails' model.actionInfo}}>
+ <div class="col-md-12">
+ <a data-toggle="modal" href="#" data-target="#actionDetailsModal">More</a>
+ </div>
+ </div>
+ {{else}}
+ <div class="row">
+ <div class="col-md-4 text-bold">Status</div>
+ <div class="col-md-8">Not Started</div>
+ </div>
+ {{/if}}
+ </div>
+ </div>
+ {{#if model.actionDetails}}
+ <div class="modal fade" role="dialog" id="actionDetailsModal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">×</button>
+ <h4 class="modal-title">Job Action Details</h4>
+ </div>
+ <div class="modal-body">
+ {{#workflow-job-action-info actionInfo=model.actionDetails}}
+ {{/workflow-job-action-info}}
+ </div>
+ </div>
+ </div>
+ </div>
+ {{/if}}
+ {{/if}}
+ </div>
+ </div>
</div>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-node.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-node.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-node.hbs
index e80462c..6187b27 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-node.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-node.hbs
@@ -53,9 +53,10 @@
<div class="node_actions node_left">
<i class="fa fa-cog node_properties" title="Edit" {{action "openEditor"}}></i>
<i class="fa fa-trash-o" title="Delete" {{action "deleteNode"}}></i>
+ <i class="fa fa-copy" title="Copy" {{action "copyNode"}}></i>
</div>
<div class="action_node_data">
- <i class="fa fa-{{icon}}"></i>
+ <i class="fa fa-{{icon}}" {{action "showNotification" node on="mouseEnter"}}></i>
{{input required pattern="([a-zA-Z_]([\-_a-zA-Z0-9])*){1,39}" name="actionName" data-toggle="tooltip" title=node.name classBinding="node.errors:error:editable" class="editable" value=node.name placeholder="Action Name"}}
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-parameters.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-parameters.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-parameters.hbs
index 769db30..b097af2 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-parameters.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/workflow-parameters.hbs
@@ -20,24 +20,23 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
- <h4 class="modal-title">Workflow Parameters</h4>
+ <h4 class="modal-title">{{displayName}} Parameters</h4>
</div>
<div class="modal-body">
-
- <div class=" panel panel-default">
- <div class="panel-heading">Configuration</div>
- <div class="panel-body handlerPanel">
- {{#field-error error=errors.parameters}}{{/field-error}}
- <form class="form-horizontal" id="action_properties">
- {{#name-value-config configuration=parameters.configuration register="register"}}{{/name-value-config}}
- </form>
+ <div class=" panel panel-default">
+ <div class="panel-heading">Configuration</div>
+ <div class="panel-body handlerPanel">
+ {{field-error model=this field='parameters.configuration.property' showErrorMessage=showErrorMessage}}
+ <form class="form-horizontal" id="action_properties">
+ {{#name-value-config configuration=parameters.configuration validations=validations register="register"}}{{/name-value-config}}
+ </form>
+ </div>
</div>
</div>
- </div>
<div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal" {{action 'close'}}>Cancel</button>
<button type="button" class="btn btn-primary" {{action "saveParameters"}}>Save</button>
</div>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/dashboard.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/dashboard.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/dashboard.hbs
index b580720..41a23b1 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/dashboard.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/dashboard.hbs
@@ -24,7 +24,7 @@
<span class="navbar-brand">Workflow Dashboard</span>
<div class="navbar-brand" id="create-new-button">
<button type="button" {{action "launchDesign"}} class="btn btn-default whiteLabel">
- <i class="fa fa-sitemap"></i> Create Workflow
+ <i class="fa fa-sitemap marginright5"></i>Workflow Designer
</button>
{{help-icon}}
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs
index b020c86..cb0462c 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/design.hbs
@@ -15,4 +15,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
-{{flow-designer xmlAppPath=appPath}}
+{{designer-workspace xmlAppPath=xmlAppPath}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js b/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js
index d9ca912..2f7df82 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/utils/constants.js
@@ -17,6 +17,9 @@
import Ember from 'ember';
export default Ember.Object.create({
+ Workflow : 'wf',
+ Coordinator : 'coord',
+ Bundle : 'bundle',
globalSetting:{
useJoinNodeForDecision:false,
useAdditionalPlaceholderFlowForDecision:true,
@@ -27,6 +30,9 @@ export default Ember.Object.create({
showErrorTransitions:false,
generatedByCdata: "Generated by Worflow Designer",
rmDefaultValue: "${resourceManager}",
+ defaultNameNodeValue : "${nameNode}",
+ useCytoscape : true,
+ autoRestoreWorkflowEnabled : true,
actions:{
hiveAction:{name : "hive",supportsSchema : true, currentVersion:''},
hive2Action:{name : "hive2",supportsSchema : true, currentVersion:''},
@@ -43,5 +49,40 @@ export default Ember.Object.create({
},
sparkMasterList :Ember.A([{value:'yarn-cluster',displayName:'Yarn Cluster'},
{value:'yarn-client',displayName:'Yarn Client'},
- {value:'local',displayName:'Local'}])
+ {value:'local',displayName:'Local'}]),
+ timezoneList : Ember.A([
+ {displayName:'UTC',gmtOffset:0, value:'UTC'},
+ {displayName:'(GMT -12:00) Eniwetok, Kwajalein',gmtOffset:12, value:'GMT-12:00'},
+ {displayName:'(GMT -11:00) Midway Island, Samoa',gmtOffset:11, value:'GMT-11:00'},
+ {displayName:'(GMT -10:00) Hawaii',gmtOffset:10, value:'GMT-10:00'},
+ {displayName:'(GMT -9:00) Alaska',gmtOffset:9, value:'GMT-09:00'},
+ {displayName:'(GMT -8:00) Pacific Time (US & Canada)',gmtOffset:8, value:'GMT-08:00'},
+ {displayName:'(GMT -7:00) Mountain Time (US & Canada)',gmtOffset:7, value:'GMT-07:00'},
+ {displayName:'(GMT -6:00) Central Time (US & Canada), Mexico City',gmtOffset:6, value:'GMT-06:00'},
+ {displayName:'(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima',gmtOffset:5, value:'GMT-05:00'},
+ {displayName:'(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz',gmtOffset:4, value:'GMT-04:00'},
+ {displayName:'(GMT -3:30) Newfoundland',gmtOffset:3.5, value:'GMT-03:30'},
+ {displayName:'(GMT -3:00) Brazil, Buenos Aires, Georgetown',gmtOffset:3, value:'GMT-03:00'},
+ {displayName:'(GMT -2:00) Mid-Atlantic',gmtOffset:2, value:'GMT-02:00'},
+ {displayName:'(GMT -1:00 hour) Azores, Cape Verde Islands',gmtOffset:1, value:'GMT-01:00'},
+ {displayName:'(GMT) Western Europe Time, London, Lisbon, Casablanca',gmtOffset:0, value:'GMT+00:00'},
+ {displayName:'(GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris',gmtOffset:-1, value:'GMT+01:00'},
+ {displayName:'(GMT +2:00) Kaliningrad, South Africa',gmtOffset:-2, value:'GMT+02:00'},
+ {displayName:'(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg',gmtOffset:-3, value:'GMT+03:00'},
+ {displayName:'(GMT +3:30) Tehran',gmtOffset:-3.5, value:'GMT+03:30'},
+ {displayName:'(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi',gmtOffset:-4, value:'GMT+04:00'},
+ {displayName:'(GMT +4:30) Kabul',gmtOffset:-4.5, value:'GMT+04:30'},
+ {displayName:'(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent',gmtOffset:-5, value:'GMT+05:00'},
+ {displayName:'(GMT +5:30) Bombay, Calcutta, Madras, New Delhi',gmtOffset:-5.5,value:'GMT+05:30'},
+ {displayName:'(GMT +5:45) Kathmandu',gmtOffset:-5.75, value:'GMT+05:45'},
+ {displayName:'(GMT +6:00) Almaty, Dhaka, Colombo',gmtOffset:-6, value:'GMT+06:00'},
+ {displayName:'(GMT +7:00) Bangkok, Hanoi, Jakarta',gmtOffset:-7, value:'GMT+07:00'},
+ {displayName:'(GMT +8:00) Beijing, Perth, Singapore, Hong Kong',gmtOffset:-8, value:'GMT+08:00'},
+ {displayName:'(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk',gmtOffset:-9, value:'GMT+09:00'},
+ {displayName:'(GMT +9:30) Adelaide, Darwin',gmtOffset:-9.5, value:'GMT+09:30'},
+ {displayName:'(GMT +10:00) Eastern Australia, Guam, Vladivostok',gmtOffset:-10, value:'GMT+10:00'},
+ {displayName:'(GMT +11:00) Magadan, Solomon Islands, New Caledonia',gmtOffset:-11, value:'GMT+11:00'},
+ {displayName:'(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka',gmtOffset:-12, value:'GMT+12:00'}
+ ]),
+ persistWorkInProgressInterval : 30000,
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/validators/decission-node-validator.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/validators/decission-node-validator.js b/contrib/views/wfmanager/src/main/resources/ui/app/validators/decission-node-validator.js
new file mode 100644
index 0000000..4d2c53e
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/validators/decission-node-validator.js
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+import BaseValidator from 'ember-cp-validations/validators/base';
+
+const DecissionNodeValidator = BaseValidator.extend({
+ validate(value, options, model, attribute) {
+ var hasDefaultCond = false;
+ value.forEach(function(item){
+ if(item.condition === "default"){
+ hasDefaultCond = true;
+ return;
+ }
+ });
+ if(!hasDefaultCond){
+ return "Decision Should have one default condition";
+ }
+ var hasEmptyCond = false;
+ value.forEach(function(item){
+ if(item.condition === '' || item.condition === undefined || Ember.$.trim(item.condition).length === 0){
+ hasEmptyCond = true;
+ return;
+ }
+ });
+ if(hasEmptyCond){
+ return "Condition cannot be blank";
+ }
+ return true;
+ }
+});
+
+DecissionNodeValidator.reopenClass({
+ /**
+ * Define attribute specific dependent keys for your validator
+ *
+ * @param {String} attribute The attribute being evaluated
+ * @param {Unknown} options Options passed into your validator
+ * @return {Array}
+ */
+ getDependentsFor(/* attribute, options */) {
+ return [];
+ }
+});
+
+export default DecissionNodeValidator;
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js b/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js
new file mode 100644
index 0000000..5282544
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-data-node-name.js
@@ -0,0 +1,60 @@
+/*
+* 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.
+*/
+import Ember from 'ember';
+import BaseValidator from 'ember-cp-validations/validators/base';
+
+const DuplicateDataNodeName = BaseValidator.extend({
+ validate(value, options, model, attribute) {
+ if (model.get('dataNodes')) {
+ var nodeNames = new Map();
+ model.get("validationErrors").clear();
+ model.get('dataNodes').forEach((item)=>{
+ if (item.data.node && item.data.node.name) {
+ Ember.set(item.data.node, "errors", false);
+ if(nodeNames.get(item.data.node.name)){
+ Ember.set(item.data.node, "errors", true);
+ model.get("validationErrors").pushObject({node:item.data,message:"Node name should be unique"});
+ }else{
+ nodeNames.set(item.data.node.name, item.data);
+ Ember.set(item.data.node, "errors", false);
+ }
+ }
+ });
+
+ if(model.get('dataNodes').length !== nodeNames.size){
+ return false;
+ }
+ return true;
+ }
+ return true;
+ }
+});
+
+DuplicateDataNodeName.reopenClass({
+ /**
+ * Define attribute specific dependent keys for your validator
+ *
+ * @param {String} attribute The attribute being evaluated
+ * @param {Unknown} options Options passed into your validator
+ * @return {Array}
+ */
+ getDependentsFor(/* attribute, options */) {
+ return [];
+ }
+});
+
+export default DuplicateDataNodeName;
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-flattened-node-name.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-flattened-node-name.js b/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-flattened-node-name.js
new file mode 100644
index 0000000..046cb53
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-flattened-node-name.js
@@ -0,0 +1,66 @@
+/*
+* 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.
+*/
+
+import Ember from 'ember';
+import BaseValidator from 'ember-cp-validations/validators/base';
+
+const DuplicateFlattenedNodeName = BaseValidator.extend({
+ validate(value, options, model, attribute) {
+ var nodeNames = new Map();
+ model.get("validationErrors").clear();
+ model.get('flattenedNodes').forEach((item)=>{
+ Ember.set(item, "errors", false);
+ if(nodeNames.get(item.name)){
+ Ember.set(item, "errors", true);
+ model.get("validationErrors").pushObject({node:item,message:"Node name should be unique"});
+ }else{
+ nodeNames.set(item.name, item);
+ Ember.set(item, "errors", false);
+ }
+ if(model.get("supportedActionTypes").indexOf(item.actionType) === -1 && item.type === "action"){
+ model.get('validationErrors').pushObject({node : item ,message : item.actionType+" is unsupported"});
+ }
+ var nodeErrors=item.validateCustom();
+ if (nodeErrors.length>0){
+ Ember.set(item, "errors", true);
+ nodeErrors.forEach(function(errMsg){
+ model.get("errors").pushObject({node:item,message:errMsg });
+ });
+ }
+ });
+
+ if(model.get('flattenedNodes').length !== nodeNames.size || (model.get("errors") && model.get("errors").length>0)){
+ return false;
+ }
+ return true;
+ }
+});
+
+DuplicateFlattenedNodeName.reopenClass({
+ /**
+ * Define attribute specific dependent keys for your validator
+ *
+ * @param {String} attribute The attribute being evaluated
+ * @param {Unknown} options Options passed into your validator
+ * @return {Array}
+ */
+ getDependentsFor(/* attribute, options */) {
+ return [];
+ }
+});
+
+export default DuplicateFlattenedNodeName;
http://git-wip-us.apache.org/repos/asf/ambari/blob/7c7412ed/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-kill-node-name.js
----------------------------------------------------------------------
diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-kill-node-name.js b/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-kill-node-name.js
new file mode 100644
index 0000000..b8770c2
--- /dev/null
+++ b/contrib/views/wfmanager/src/main/resources/ui/app/validators/duplicate-kill-node-name.js
@@ -0,0 +1,58 @@
+/*
+* 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.
+*/
+import BaseValidator from 'ember-cp-validations/validators/base';
+
+const DuplicateKillNodeName = BaseValidator.extend({
+ validate(value, options, model, attribute) {
+ let killNodes = [], flag;
+ model.get("validationErrors").clear();
+ if(model.get("workflow") && model.get("workflow").killNodes){
+ killNodes = model.get("workflow").killNodes;
+ for(let i=0; i<killNodes.length; i++){
+ for(let j=0; j<killNodes.length; j++){
+ if(killNodes[i].name === killNodes[j].name && i !== j){
+ model.get('validationErrors').pushObject({node : killNodes[j] ,message : "Duplicate killnode"});
+ flag = true;
+ break;
+ }
+ }
+ if(flag){
+ break;
+ }
+ }
+ }
+ if (flag){
+ return false;
+ }
+ return true;
+ }
+});
+
+DuplicateKillNodeName.reopenClass({
+ /**
+ * Define attribute specific dependent keys for your validator
+ *
+ * @param {String} attribute The attribute being evaluated
+ * @param {Unknown} options Options passed into your validator
+ * @return {Array}
+ */
+ getDependentsFor(/* attribute, options */) {
+ return [];
+ }
+});
+
+export default DuplicateKillNodeName;