http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/dataset-config.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/dataset-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/dataset-config.hbs new file mode 100644 index 0000000..e07a58c --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/dataset-config.hbs @@ -0,0 +1,70 @@ +{{! +* 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="well"> + <div class="form-group"> + <label for="" class="control-label col-xs-2">Name<span class="requiredField"> *</span></label> + <div class="col-xs-7"> + {{input type="text" class="form-control" name="dataset-name" value=dataset.name placeholder="Dataset Name"}} + {{field-error model=this field='dataset.name' showErrorMessage=showErrorMessage}} + </div> + </div> + <div class="form-group"> + <label for="" class="control-label col-xs-2">URI Template<span class="requiredField"> *</span></label> + <div class="col-xs-7"> + {{input type="text" class="form-control" name="uri-template" value=dataset.uriTemplate placeholder="baseFsURI/${YEAR}/${MONTH}/${DAY}/${HOUR}/${MINUTE}"}} + {{field-error model=this field='dataset.uriTemplate' showErrorMessage=showErrorMessage}} + </div> + </div> + <div class="form-group"> + <label class="control-label col-xs-2">Frequency<span class="requiredField"> *</span></label> + <div class="col-xs-2"> + <select class="form-control" name="frequency-type" title="Frequency type" onchange={{action (mut dataset.frequency.type) value="target.value"}}> + {{#each timeUnitOptions as |timeUnit|}} + <option value={{timeUnit.value}} selected={{eq timeUnit.value dataset.frequency.type}}>{{timeUnit.displayName}}</option> + {{/each}} + </select> + {{#field-error model=this field='dataset.frequency.type' showErrorMessage=showErrorMessage}}{{/field-error}} + </div> + <div class="col-xs-3"> + {{input class="form-control" type="text" value=dataset.frequency.value placeholder="frequency" title="Periodic intervals at which datasets that are produced, and coordinator applications are scheduled to run"}} + {{field-error model=this field='dataset.frequency.value' showErrorMessage=showErrorMessage}} + </div> + </div> + {{#date-with-expr required=true inputName="initialInstance" label="Initial Instance" inputPlaceholder="Initial Instance" dateField=dataset.initialInstance register="registerChild" deregister="deregisterChild"}}{{/date-with-expr}} + <div class="form-group"> + <label for="" class="control-label col-xs-2">Time Zone<span class="requiredField"> *</span></label> + <div class="col-xs-7"> + <select onchange={{action (mut dataset.timezone) value="target.value"}} name="select-input" class="form-control" data-show-icon="true"> + {{#each timezoneList as |timezone index|}} + <option value={{timezone.value}} selected={{eq timezone.value dataset.timezone}}>{{timezone.displayName}}</option> + {{/each}} + </select> + {{field-error model=this field='dataset.timezone' showErrorMessage=showErrorMessage}} + </div> + </div> + <div class="form-group"> + <div class="col-xs-7 pull-right"> + <button id="dataset-add-btn" {{action 'cancelDatasetOperation'}} type="button" class="btn btn-default">Cancel</button> + {{#if createMode}} + <button id="dataset-add-btn" {{action 'addDataset'}} type="button" class="btn btn-primary">Save</button> + {{else}} + <button id="dataset-update-btn" {{action 'updateDataset'}} type="button" class="btn btn-primary"> Update </button> + {{/if}} + </div> + </div> +</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/date-with-expr.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/date-with-expr.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/date-with-expr.hbs new file mode 100644 index 0000000..4c86f3d --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/date-with-expr.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 class="form-group"> + <label for="" class="control-label col-xs-2">{{label}} + {{#if required}} + <span class="requiredField"> *</span> + {{/if}} + </label> + <div class="col-xs-7"> + <div class="input-group"> + <div class="input-group-btn"> + <button onclick={{action (mut dateField.type) "date"}} type="button" class="btn btn-default {{if (eq dateField.type 'date') 'btn-primary' ''}} scope-btn"> + Date + </button> + <button onclick={{action (mut dateField.type) "expr"}} type="button" class="btn btn-default {{if (eq dateField.type 'expr') 'btn-primary' ''}} scope-btn"> + Expression + </button> + </div> + {{input type="text" class="form-control" name=inputName value=dateField.displayValue placeholder=inputPlaceholder}} + </div> + {{#if required}} + {{field-error model=this field='dateField.displayValue' showErrorMessage=showErrorMessage}} + {{/if}} + </div> + {{yield}} +</div> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/decision-add-branch.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/decision-add-branch.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/decision-add-branch.hbs index 19447dd..5670879 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/decision-add-branch.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/decision-add-branch.hbs @@ -31,7 +31,7 @@ type="button" data-html="true"> <label for="inputPassword" class="control-label col-xs-4">Condition<span class="requiredField"> *</span></label> <div class="col-xs-7"> {{input type="text" class="form-control" value=condition}} - {{field-error error=errors.condition}} + {{field-error model=this field='condition' showErrorMessage=showErrorMessage}} </div> </div> <div class="form-group"> @@ -46,7 +46,7 @@ type="button" data-html="true"> <option value={{node.id}} selected={{eq node.name currentNode.errorNode.name}}>{{node.name}}</option> {{/each}} </select> - {{field-error error=errors.targetNode}} + {{field-error model=this field='targetNode' showErrorMessage=showErrorMessage}} </div> </div> </form> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/decision-config.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/decision-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/decision-config.hbs index 342653f..cb7ff46 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/decision-config.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/decision-config.hbs @@ -16,7 +16,7 @@ * limitations under the License. }} <div class="decisionNodeError"> - {{#field-error error=errors.actionModel}}{{/field-error}} + {{field-error model=this field='actionModel' showErrorMessage=showErrorMessage}} </div> <table id="decision-properties-table" class="table decision-properties-table listing table-hover table-bordered" cellspacing="0"> <thead> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-workspace.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-workspace.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-workspace.hbs new file mode 100644 index 0000000..b775302 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/designer-workspace.hbs @@ -0,0 +1,106 @@ +{{! +* 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="main"> + <nav class="navbar navbar-default mb0"> + <div class="container-fluid"> + <div class="row"> + <div class="col-sm-4"> + <div class="navbar-brand"> + <label for="">Workflow Designer</label> + </div> + </div> + <div class="col-sm-8"> + <div class="text-right pull-right paddingtop7"> + <div class="btn-group btn-group" role="group" aria-label="buttons"> + <button id="wfs_btn" {{action 'show' 'wf'}} type="button" class="btn btn-default"> + <i class="fa fa-sitemap marginright5"></i> + {{#if hasMultitabSupport}} + New Workflow + {{else}} + Workflow + {{/if}} + </button> + <button id="coords_btn" {{action 'show' 'coord'}} type="button" class="btn btn-default"> + <i class="fa fa-history marginright5"></i> + {{#if hasMultitabSupport}} + New Coordinator + {{else}} + Coordinator + {{/if}} + </button> + <button id="bundles_btn" {{action 'show' 'bundle'}} type="button" class="btn btn-default"> + <i class="fa fa-cubes marginright5"></i> + {{#if hasMultitabSupport}} + New Bundle + {{else}} + Bundle + {{/if}} + </button> + {{#link-to 'dashboard' class="backto-dashboard btn btn-default" title="Workflow Dashboard"}} + <i class="fa fa-th marginright5"></i>Dashboard + {{/link-to}} + </div> + {{help-icon}} + </div> + </div> + </div> + </div> + </nav> + <ul class="nav nav-tabs tab-panel-heading"> + {{#each tabs as |tab index|}} + <li class="{{if (eq index currentIndex) 'active'}}" title="{{tab.filePath}}"> + <a href="#{{tab.id}}" data-toggle="tab" {{action 'interceptShow' tab}}> + {{#if (eq tab.type 'wf')}} + <i class="fa fa-sitemap marginright5"></i> + {{else if (eq tab.type 'coord')}} + <i class="fa fa-history marginright5"></i> + {{else if (eq tab.type 'bundle')}} + <i class="fa fa-cubes marginright5"></i> + {{/if}} + {{tab.name}} + <span class="closeTab" {{action "closeTab" index bubbles=false }}>x</span> + </a> + </li> + {{/each}} + </ul> + <div class="tab-content"> + {{#each tabs as |tab index|}} + <div class="tab-pane {{if (eq index currentIndex) 'active'}}" id="{{tab.id}}"> + {{#if (eq tab.type 'wf')}} + {{flow-designer xmlAppPath=tab.path register="register" openTab="openTab" changeTabName="changeTabName" changeFilePath="changeFilePath" tabInfo=tab}} + {{else if (eq tab.type 'coord')}} + {{coord-config xmlAppPath=tab.path register="register" openTab="openTab" changeTabName="changeTabName" changeFilePath="changeFilePath" tabInfo=tab}} + {{else if (eq tab.type 'bundle')}} + {{bundle-config register="register" openTab="openTab" changeTabName="changeTabName" changeFilePath="changeFilePath" tabInfo=tab}} + {{else}} + {{spin-spinner lines=7 length=3 width=3 radius=3 top=-10 left=150}} + {{/if}} + </div> + {{/each}} + </div> +</div> +<!-- + {{#if (eq type 'wf')}} + {{flow-designer xmlAppPath=appPath isNew=isNew}} + {{else if (eq type 'coord')}} + {{coord-config}} + {{else if (eq type 'bundle')}} + {{bundle-config}} + {{else}} + {{spin-spinner lines=7 length=3 width=3 radius=3 top=-10 left=150}} + {{/if}} --> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/distcp-action-info.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/distcp-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/distcp-action-info.hbs new file mode 100644 index 0000000..c7de5e4 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/distcp-action-info.hbs @@ -0,0 +1,35 @@ +{{! +* 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.javaOpts}}<li class="list-group-item"><b>Java Opts : </b><br/>{{hoveredAction.javaOpts}}</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/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/email-action-info.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/email-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/email-action-info.hbs new file mode 100644 index 0000000..a8c5343 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/email-action-info.hbs @@ -0,0 +1,28 @@ +{{! +* 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.to}}<li class="list-group-item"><b>To : </b><br/>{{hoveredAction.to}}</li>{{/if}} + {{#if hoveredAction.cc}}<li class="list-group-item"><b>Cc : </b><br/>{{hoveredAction.cc}} </li>{{/if}} + {{#if hoveredAction.bcc}}<li class="list-group-item"><b>Bcc : </b><br/>{{hoveredAction.bcc}} </li>{{/if}} + {{#if hoveredAction.subject}}<li class="list-group-item"><b>Subject : </b><br/>{{hoveredAction.subject}} </li>{{/if}} + {{#if hoveredAction.body}}<li class="list-group-item"><b>Body : </b><br/>{{hoveredAction.body}} </li>{{/if}} + </ul> +</div> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/email-action.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/email-action.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/email-action.hbs index b9680a1..7622eb7 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/email-action.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/email-action.hbs @@ -22,14 +22,14 @@ <label for="inputEmail" class="control-label col-xs-2">To<span class="requiredField"> *</span></label> <div class="col-xs-7"> {{input type="text" class="form-control" name="to" value=actionModel.to placeholder="Email to" title="list of comma seperated email id's"}} - {{field-error error=errors.actionModel.to}} + {{field-error model=this field='actionModel.to' showErrorMessage=showErrorMessage}} </div> </div> <div class="form-group"> <label for="inputEmail" class="control-label col-xs-2">Cc </label> <div class="col-xs-7"> {{input type="text" class="form-control" name="cc" value=actionModel.cc placeholder="Cc To" title="list of comma seperated email id's"}} - {{field-error error=errors.actionModel.cc}} + {{field-error model=this field='actionModel.cc' showErrorMessage=showErrorMessage}} </div> </div> @@ -37,7 +37,7 @@ <label for="inputEmail" class="control-label col-xs-2">Bcc </label> <div class="col-xs-7"> {{input type="text" class="form-control" name="bcc" value=actionModel.bcc placeholder="Bcc To" title="list of comma seperated email id's"}} - {{field-error error=errors.actionModel.bcc}} + {{field-error model=this field='actionModel.bcc' showErrorMessage=showErrorMessage}} </div> </div> @@ -45,7 +45,7 @@ <label for="inputEmail" class="control-label col-xs-2">Subject<span class="requiredField"> *</span></label> <div class="col-xs-7"> {{input type="text" class="form-control" name="subject" value=actionModel.subject placeholder="Subject"}} - {{field-error error=errors.actionModel.subject}} + {{field-error model=this field='actionModel.subject' showErrorMessage=showErrorMessage}} </div> </div> @@ -53,7 +53,7 @@ <label for="inputEmail" class="control-label col-xs-2">Body<span class="requiredField"> *</span></label> <div class="col-xs-7"> {{textarea class="form-control" name="body" value=actionModel.body placeholder="Body"}} - {{field-error error=errors.actionModel.body}} + {{field-error model=this field='actionModel.body' showErrorMessage=showErrorMessage}} </div> </div> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/field-error.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/field-error.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/field-error.hbs index 8f4d8dc..f0282bf 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/field-error.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/field-error.hbs @@ -16,6 +16,9 @@ * limitations under the License. }} {{yield}} +{{#if (or (and showErrorMessage (v-get model field 'isInvalid')) (and (v-get model field 'isInvalid')(v-get model field 'isDirty')))}} + <label class="control-label text-danger"> {{v-get model field 'message'}}</label> +{{/if}} {{#if errorMessage}} <label class="control-label text-danger">{{errorMessage}}</label> {{/if}} http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs index 71eec96..c8f0f0e 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/flow-designer.hbs @@ -16,87 +16,138 @@ * limitations under the License. }} <div class="main"> - <nav class="navbar navbar-default mb0"> - <div class="container-fluid"> + <nav class="navbar navbar-default mb0 borderTopNone"> + <div class="container-fluid container-custom"> <div class="navbar-header"> - <div class="navbar-brand"> - <div class="padding0"> - Workflow Designer + <div class="form-inline col-xs-4 paddingtop8"> + <div class="form-group"> + <label for="wf_title">Name</label> + {{input class="form-control job-title" type="text" name="wf_title" value=workflow.name title="Workflow Name" placeholder="Workflow Name"}} </div> </div> - <div class="padding0"> - {{input class="form-control" type="text" id="wf_title" value=workflow.name title="Workflow Name" placeholder="Workflow Name"}} - </div> {{#if workflowFilePath}} <div class="wf-path padding20" title={{workflowFilePath}}> Path:{{ workflowFilePath}} </div> {{/if}} - <div class="navbar-brand pull-right paddingtop10"> - <div class="btn-group" role="group" aria-label="..."> - <button type="button" class="btn btn-default" data-toggle="modal" data-target="#ConfirmDialog" title="New Workflow" {{action "conirmCreatingNewWorkflow"}}> - <i class="fa fa-file"> New</i> - </button> - <button type="button" class="btn btn-default" title="Import workflow" {{action "showFileBrowser"}}> - <i class="fa fa-download"> Import</i> - </button> - <button id="import-workflow-test" type="button" class="btn btn-default hide" title="Import workflow Test" {{action "importWorkflowTest"}}> - <i class="fa fa-download"></i> - </button> - <button type="button" class="btn btn-primary" title="Submit workflow" {{action "submitWorkflow"}}> - <i class="fa fa-upload"> Submit</i> - </button> - {{#link-to 'dashboard' class="backto-dashboard" }} - <button type="button" class="btn btn-default" title="Workflow Dashboard"> - <i class="fa fa-th"> Dashboard</i> - </button> - {{/link-to}} - </div> + <div class="navbar-brand pull-right paddingtop8 col-xs-18"> + <button type="button" class="btn btn-default" title="Import workflow" {{action "showFileBrowser"}}> + <i class="fa fa-download marginright5"></i>Import + </button> + <button id="import-workflow-test" type="button" class="btn btn-default hide" title="Import workflow Test" {{action "importWorkflowTest"}}> + <i class="fa fa-download"></i> + </button> <div class="btn-group"> <div class="dropdown"> - <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Settings + <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"><i class="fa fa-refresh marginright5"></i>Reset <span class="caret"></span></button> <ul class="dropdown-menu"> <li> - <a href="javascript:void(0)" title="Global Configurations" {{action "showWorkflowGlobalProps"}}> - Global Configurations - </a> + <a data-toggle="modal" data-target="#ConfirmDialog" title="Reset Workflow" {{action "conirmCreatingNewWorkflow"}}> + Reset Workflow + </a> </li> - <li><a href="javascript:void(0)" title="Workflow Credentials Configuration" {{action "showCredentials" true}}> - Workflow Credentials - </a></li> - <li><a href="javascript:void(0)" title="SLA for Workflow" {{action "showWorkflowSla" true}}> - SLA for Workflow - </a> + {{#if useCytoscape}} + <li> + <a title="Reset Layout" {{action "resetLayout"}}> + Reset Layout + </a> </li> - <li><a href="javascript:void(0)" title="Workflow Parameters Configuration" {{action "showParameterSettings" true}}> - Workflow Parameters - </a></li> - <li><a href="javascript:void(0)" title="Workflow and Action Versions" {{action "showVersionSettings" true}}> - Workflow and Action Versions - </a> - </li> + {{/if}} </ul> </div> </div> <div class="btn-group"> - <button type="button" class="btn btn-default" data-toggle="modal" data-target="#kill-node-dialog" title="Create Kill Node" {{action "showCreateKillNode" true}}> - <i class="fa fa-ban"></i> + <div class="btn-group"> + <div class="dropdown"> + <button class="btn btn-default dropdown-toggle borderRightRadiusNone" type="button" data-toggle="dropdown"><i class="fa fa-ban marginright5"></i>Kill Nodes + <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li> + <a data-toggle="modal" title="Create Kill Node" {{action "showCreateKillNode" true}}> + Create Kill Node + </a> + <a data-toggle="modal" title="Manage Kill Nodes" {{action "showKillNodeManager" true}}> + Manage Kill Nodes + </a> + </li> + </ul> + </div> + </div> + <div class="btn-group"> + <div class="dropdown"> + <button class="btn btn-default dropdown-toggle borderRadiusNone" type="button" data-toggle="dropdown"><i class="fa fa-cog marginright5"></i>Settings + <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li> + <a href="javascript:void(0)" title="Global Configurations" {{action "showWorkflowGlobalProps"}}> + Global Configurations + </a> + </li> + <li><a href="javascript:void(0)" title="Workflow Credentials Configuration" {{action "showCredentials" true}}> + Workflow Credentials + </a></li> + <li><a href="javascript:void(0)" title="SLA for Workflow" {{action "showWorkflowSla" true}}> + SLA for Workflow + </a> + </li> + <li><a href="javascript:void(0)" title="Workflow Parameters Configuration" {{action "showingParameterSettings" true}}> + Workflow Parameters + </a></li> + <li><a href="javascript:void(0)" title="Workflow and Action Versions" {{action "showVersionSettings" true}}> + Workflow and Action Versions + </a> + </li> + </ul> + </div> + </div> + <div class="btn-group"> + <div class="dropdown"> + <button class="btn btn-default dropdown-toggle borderRadiusNone" type="button" data-toggle="dropdown"><i class="marginright5"></i>More + <span class="caret"></span></button> + <ul class="dropdown-menu"> + <li> + <a href="javascript:void(0)" data-toggle="modal" data-target="#previewModal" title="Preview workflow" {{action "previewWorkflow"}}> + <i class="fa fa-eye marginright5"></i>Preview xml + </a> + </li> + <li> + <a href="javascript:void(0)" data-toggle="modal" title="Download workflow" {{action "downloadWorkflowXml"}}> + <i class="fa fa-download marginright5"></i>Download xml + </a> + </li> + </ul> + </div> + </div> + <button type="button" class="btn btn-default" title="Submit workflow" {{action "saveWorkflow"}}> + <i class="fa fa-floppy-o marginright5"></i>Save + </button> + <button type="button" class="btn btn-primary" title="Dry run workflow" {{action "dryRunWorkflow"}}> + <i class="fa fa-play marginright5"></i> Test Run </button> - - <button data-toggle="modal" data-target="#previewModal" type="button" class="btn btn-default" title="Preview workflow" {{action "previewWorkflow"}}> - <i class="fa fa-eye"></i> + <button type="button" class="btn btn-primary" title="Submit workflow" {{action "submitWorkflow"}}> + <i class="fa fa-upload marginright5"></i>Submit </button> </div> - {{help-icon}} </div> </div> </div> </nav> + {{#if showNotificationPanel}} + {{component hoveredWidget hoveredAction=hoveredAction hideNotification="hideNotification"}} + {{/if}} <div id="content" class="panel panel-default designer-main-panel col-xs-20"> <div class="panel-body designer-panel designer-canvas"> {{designer-errors errors=errors validationErrors=validationErrors}} - + {{#if undoAvailable}} + <div id="alert"class="alert alert-warning" role="alert"> + {{#if (eq undoType 'node')}} + <label>Node <i>{{deletedNode.name}}</i> deleted <span class="undo" {{action 'undoDelete'}}><u>Undo</u></span></label> + {{else}} + <label>Transition deleted <span class="undo" {{action 'undoDelete'}}><u>Undo</u></span></label> + {{/if}} + </div> + {{/if}} {{#if isWorkflowImporting}} <div id="loader"> <div id="alert"class="alert alert-info alert-dismissible" role="alert"> @@ -107,38 +158,94 @@ {{#unless isImportingSuccess}} <div id="loader"> <div id="alert"class="alert alert-danger alert-dismissible" role="alert"> - There is some problem while importing.Please try again. + There is some problem while importing.Please try again. + {{#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> </div> {{/unless}} <div id="flow-designer"> {{#each flattenedNodes as |node|}} <div class="node-wrapper"> - {{#workflow-node node=node deleteNode="deleteNode" openEditor="openEditor" addBranch="addBranch" addDecisionBranch="addDecisionBranch" onNameChange="nameChanged"}}{{/workflow-node}} + {{#workflow-node node=node deleteNode="deleteNode" copyNode="copyNode" openEditor="openEditor" showNotification="showNotification" hideNotification="hideNotification" addBranch="addBranch" addDecisionBranch="addDecisionBranch" onNameChange="nameChanged"}}{{/workflow-node}} </div> {{/each}} - <div id="killnodes-container"> - {{#if workflow.killNodes.length}} - <div class=""> - <label id='kill-nodes-title' class='info' for="">Kill Nodes</label> - </div> - {{/if}} - {{#each workflow.killNodes as |node|}} - {{#workflow-node positionRelative=1 node=node deleteNode="deleteNode" openEditor="openEditor" addBranch="addBranch" onNameChange="nameChanged" addNode="addNode"}}{{/workflow-node}} + {{#if useCytoscape}} + <div id="cyRenderer"> + <div id="{{cyId}}" class="cy-panel"></div> + {{#each dataNodes as |dataNode|}} + {{#if (or (eq dataNode.data.type 'action') (eq dataNode.data.type 'decision') (eq dataNode.data.type 'fork'))}} + <div id="{{dataNode.data.id}}" class=""> + {{input required pattern="([a-zA-Z_]([\-_a-zA-Z0-9])*){1,39}" name="actionName" data-toggle="tooltip" title=dataNode.name classBinding="dataNode.data.node.errors:error:editable" class="editableNode overlay_node_editor" value=dataNode.dataNodeName placeholder="Action Name"}} + </div> + {{/if}} {{/each}} + <div class="overlay-node-label">asd</div> + <div class="overlay-transition-content"> + <div class="decision-condition-label"> + <div class="decision-condition-header">Condition</div> + <div class="decision-condition-body"></div> + </div> + <div class="overlay-transition-actions"> + <span class="overlay-plus-icon"> + <i class="fa fa-plus-square"></i> + </span> + <span class="overlay-trash-transition-icon"> + <i class="fa fa-trash-o"></i> + </span> + </div> + </div> + <div class="overlay-node-actions"> + <span class="overlay-settings-icon" title="Action settings"> + <i class="fa fa-cog"></i> + </span> + <span class="overlay-opentab-icon" title="Open Parent Workflow"> + <i class="fa fa-external-link"></i> + </span> + <span class="overlay-fork-icon"> + <i class="fa fa-code-fork"></i> + </span> + <span class="overlay-trash-icon" title="Delete Node"> + <i class="fa fa-trash-o"></i> + </span> + <span class="overlay-cut-icon" title="Cut Node"> + <i class="fa fa-cut"></i> + </span> + <span class="overlay-copy-icon" title="Copy Node"> + <i class="fa fa-copy"></i> + </span> + <span class="overlay-paste-icon" title="Replace Node from Clipboard"> + <i class="fa fa-paste"></i> + </span> + </div> + {{decision-add-branch node=node registerAddBranchAction="registerAddBranchAction" addDecisionBranch="addDecisionBranch" workflow=workflow}} </div> + {{#if cyOverflow.overflown}} + <div class="cyScrollMsg"><i class="fa fa-ellipsis-h cyScrollMsgContent" title="Use the pan tool or drag on canvas to see more" aria-hidden="true"></i></div> + {{/if}} + {{/if}} </div> <div id="workflow-actions" class="hidden"> - {{workflow-actions element=popOverElement addNode="addNode"}} + {{workflow-actions element=popOverElement addNode="addNode" pasteNode="pasteNode" clipboard=clipboard}} </div> </div> </div> </div> {{#if showActionEditor}} - {{workflow-action-editor actionType=currentAction closeActionEditor="closeActionEditor" addKillNode="addKillNode" actionModel=currentNode.domain nodeType=currentNode.type currentNode=currentNode killNodes=workflow.killNodes credentials=workflow.credentials}} + {{workflow-action-editor actionType=currentAction closeActionEditor="closeActionEditor" setNodeTransitions="setNodeTransitions" actionModel=currentNode.domain nodeType=currentNode.type currentNode=currentNode killNodes=workflow.killNodes credentials=workflow.credentials}} +{{/if}} +{{#if showingSaveWorkflow}} + {{save-wf type='wf' closeJobConfigs="closeWorkflowSubmitConfigs" jobFilePath=workflowFilePath openFileBrowser="openFileBrowser" closeFileBrowser="closeFileBrowser" jobConfigs=workflowSubmitConfigs setFilePath="setFilePath" isDryrun=dryrun}} {{/if}} {{#if showingWorkflowConfigProps}} - {{workflow-config closeWorkflowSubmitConfigs="closeWorkflowSubmitConfigs" workflowFilePath=workflowFilePath openFileBrowser="openFileBrowser" closeFileBrowser="closeFileBrowser" workflowSubmitConfigs=workflowSubmitConfigs}} + {{job-config type='wf' closeJobConfigs="closeWorkflowSubmitConfigs" jobFilePath=workflowFilePath openFileBrowser="openFileBrowser" closeFileBrowser="closeFileBrowser" jobConfigs=workflowSubmitConfigs isDryrun=dryrun}} {{/if}} {{#if showGlobalConfig}} {{#global-config closeGlobalConfig="closeWorkflowGlobalProps" saveGlobalConfig="saveGlobalConfig" actionModel=globalConfig}}{{/global-config}} @@ -147,43 +254,12 @@ {{hdfs-browser closeFileBrowser="closeFileBrowser" selectFileCallback=selectFileCallback filePath=workflowFilePath}} {{/if}} {{#if showingPreview}} - <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">Workflow Xml Preview</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> + {{#preview-dialog title="Workflow XML Preview" previewXml=previewXml}}{{/preview-dialog}} {{/if}} - {{#if showingConfirmationNewWorkflow}} - <div id="ConfirmDialog" 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">Confirm create new workflow</h4> - </div> - <div class="modal-body"> - Any unsaved changes may be lost.Do you want to proceed creating new workflow? - </div> - <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> - <button type="button" class="btn btn-primary" {{action "createNewWorkflow"}} data-dismiss="modal">Continue</button> - </div> - </div> - </div> - </div> + {{#confirmation-dialog title="Confirm workflow reset" + confirmationMessage="Any unsaved changes may be lost. Do you want to proceed resetting the workflow ?" + okBtnText="Continue" cancelBtnText="Cancel" onOk="createNewWorkflow"}}{{/confirmation-dialog}} {{/if}} {{#if showCreateKillNode}} <div id="kill-node-dialog" class="modal fade" role="dialog"> @@ -195,18 +271,15 @@ </div> <div class="modal-body"> {{#if createKillnodeError}} + <div class="row"> + <div class="form-group"> + <label class="text-danger control-label col-xs-8"> + {{createKillnodeError}} + </label> + </div> + </div> + {{/if}} <div class="row"> - <div class="form-group"> - - <label class="text-danger control-label col-xs-8"> - {{createKillnodeError}} - </label> - - </div> - </div> - {{/if}} - <div class="row"> - <div class="form-group" id="killNodeName"> <label class="control-label col-xs-3"> Kill node name</label> <div class="col-xs-7"> @@ -241,5 +314,8 @@ {{#workflow-credentials showCredentials="showCredentials" workflowCredentials=workflow.credentials}}{{/workflow-credentials}} {{/if}} {{#if showParameterSettings}} - {{#workflow-parameters closeWorkFlowParam="closeWorkFlowParam" saveWorkFlowParam="saveWorkFlowParam" parameters=parameters}}{{/workflow-parameters}} + {{#workflow-parameters type='wf' closeWorkFlowParam="closeWorkFlowParam" saveWorkFlowParam="saveWorkFlowParam" parameters=parameters}}{{/workflow-parameters}} +{{/if}} +{{#if showKillNodeManager}} + {{#killnode-manager killNodes=workflow.killNodes killNode=killNode createKillnodeError=createKillnodeError createKillNode="createKillNode" deleteNode="deleteNode" addKillNodeMode=addKillNodeMode editMode=editMode closeKillNodeManager="closeKillNodeManager"}}{{/killnode-manager}} {{/if}} http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fs-action-info.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fs-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fs-action-info.hbs new file mode 100644 index 0000000..2f06e29 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fs-action-info.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="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.fsOps}}<li class="list-group-item"><b>File Operations : </b> + {{#fsaction-info action=hoveredAction}}{{/fsaction-info}} + </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/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fs-action.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fs-action.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fs-action.hbs index ef86a50..97f88fa 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fs-action.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fs-action.hbs @@ -18,8 +18,7 @@ <div class="panel panel-default"> <div class="panel-heading">General</div> <div class="panel-body"> - {{#field-error error=errors.actionModel}}{{/field-error}} - + {{field-error model=this field='actionModel.fsOps' showErrorMessage=showErrorMessage}} {{#prepare-config-fs fsOps=actionModel.fsOps openFileBrowser="openFileBrowser" register="register"}}{{/prepare-config-fs}} {{#jobxml-config jobXml=actionModel.jobXml openFileBrowser="openFileBrowser" register="register"}}{{/jobxml-config}} </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fsaction-info.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fsaction-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fsaction-info.hbs new file mode 100644 index 0000000..6fa97d9 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/fsaction-info.hbs @@ -0,0 +1,39 @@ +{{! +* 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.fsOps as |obj|}} + <ul class="list-unstyled"> + {{#if (eq obj.type "mkdir")}} + <li>Type is {{obj.type}} and path is {{obj.settings.path}}</li> + {{/if}} + {{#if (eq obj.type "delete")}} + <li>Type is {{obj.type}} and path is {{obj.settings.path}}</li> + {{/if}} + {{#if (eq obj.type "touchz")}} + <li>Type is {{obj.type}} and path is {{obj.settings.path}}</li> + {{/if}} + {{#if (eq obj.type "move")}} + <li>Type is {{obj.type}} and Source is {{obj.settings.source}} and Target is {{obj.settings.target}}</li> + {{/if}} + {{#if (eq obj.type "chmod")}} + <li>Type is {{obj.type}} and dirfiles is {{obj.settings.dirfiles}}, recursive is {{obj.settings.recursive}}, path is {{obj.settings.path}}, permissions are {{obj.settings.permissions}}</li> + {{/if}} + {{#if (eq obj.type "chgrp")}} + <li>Type is {{obj.type}} and dirfiles is {{obj.settings.dirfiles}}, recursive is {{obj.settings.recursive}}, path is {{obj.settings.path}}, group : {{obj.settings.group}}</li> + {{/if}} + </ul> +{{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs index d3233b6..437640d 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hdfs-browser.hbs @@ -74,7 +74,7 @@ <label class="control-label">Selected Path</label> </div> <div class="col-xs-6"> - {{input id="selectedPath" class="form-control" type="text" value=selectedPath}} + {{input name="selectedPath" class="form-control" type="text" value=selectedPath}} </div> <div class="col-xs-4"> <button type="button" class="btn btn-primary" {{action "selectFile"}}>Select</button> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive-action-info.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive-action-info.hbs new file mode 100644 index 0000000..0e30972 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive-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.jobTracker}}<li class="list-group-item"><b>Resource Manager</b> : <br/>{{hoveredAction.jobTracker}} </li>{{/if}} + {{#if hoveredAction.script}}<li class="list-group-item"><b>Script</b> : <br/>{{hoveredAction.script}}</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.params}}<li class="list-group-item"><b>Params</b> : + {{#property-value-config action=hoveredAction.params}}{{/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/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive-action.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive-action.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive-action.hbs index dc94160..eb959c3 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive-action.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive-action.hbs @@ -36,7 +36,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> {{else}} @@ -46,7 +46,7 @@ <div class="input-group"> {{textarea class="form-control" name="query" class="query-text-area" value=actionModel.query placeholder="hive query"}} </div> - {{#field-error error=errors.actionModel.query}}{{/field-error}} + {{field-error model=this field='actionModel.query' showErrorMessage=showErrorMessage}} </div> </div> {{/if}} @@ -96,4 +96,4 @@ </div> </div> </div> - {{#sla-info slaInfo=actionModel.slaInfo register="register" slaEnabled=actionModel.slaEnabled register="register"}}{{/sla-info}} + {{#sla-info slaInfo=actionModel.slaInfo slaEnabled=actionModel.slaEnabled register="register"}}{{/sla-info}} http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive2-action-info.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive2-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive2-action-info.hbs new file mode 100644 index 0000000..5a58b5a --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive2-action-info.hbs @@ -0,0 +1,49 @@ +{{! +* 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.script}}<li class="list-group-item"><b>Script : </b> <br/>{{hoveredAction.script}}</li>{{/if}} + {{#if hoveredAction.jdbc-url}}<li class="list-group-item"><b>Jdbc-url :</b> <br/>{{hoveredAction.jdbc-url}}</li>{{/if}} + {{#if hoveredAction.password}}<li class="list-group-item"><b>Password :</b> <br/>{{hoveredAction.password}}</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.params}}<li class="list-group-item"><b>Params : </b> + {{#property-value-config action=hoveredAction.params}}{{/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/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive2-action.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive2-action.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive2-action.hbs index c4bec81..563cca8 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive2-action.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/hive2-action.hbs @@ -37,7 +37,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> {{else}} @@ -47,7 +47,7 @@ <div class="input-group"> {{textarea class="form-control" name="query" class="query-text-area" value=actionModel.query placeholder="hive query"}} </div> - {{#field-error error=errors.actionModel.query}}{{/field-error}} + {{field-error model=this field='actionModel.query' showErrorMessage=showErrorMessage}} </div> </div> {{/if}} @@ -55,7 +55,7 @@ <label class="control-label col-xs-2">jdbc-url<span class="requiredField"> *</span></label> <div class="col-xs-7"> {{input type="text" class="form-control" validations="required" name="jdbc-url" value=actionModel.jdbc-url placeholder="jdbc-url"}} - {{#field-error error=errors.actionModel.jdbc-url}}{{/field-error}} + {{field-error model=this field='actionModel.jdbc-url' showErrorMessage=showErrorMessage}} </div> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/info-header.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/info-header.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/info-header.hbs new file mode 100644 index 0000000..5fdd702 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/info-header.hbs @@ -0,0 +1,18 @@ +{{! +* 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. +}} +<b>Action Details</b><a href="#" class="pull-right" {{action "hideNotification"}}>X</a> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/instance-list-config.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/instance-list-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/instance-list-config.hbs new file mode 100644 index 0000000..94f4e39 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/instance-list-config.hbs @@ -0,0 +1,35 @@ +{{! +* 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> + {{#each instances as |instance index|}} + <div class="form-group"> + {{#date-with-expr required=true inputName="instance" label="Instance" inputPlaceholder="Instance" dateField=instance}} + <div class="col-xs-1"> + <input class="form-control btn btn-danger" type="button" {{action "deleteInstance" index}} value="-"> + </div> + {{/date-with-expr}} + </div> + {{/each}} + <div class="form-group"> + {{#date-with-expr inputName="instance" label="Instance" inputPlaceholder="Instance" dateField=instance}} + <div class="col-xs-1"> + <input class="form-control btn btn-success" type="button" value="+" {{action "addInstance"}}> + </div> + {{/date-with-expr}} + </div> +</div> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/java-action-info.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/java-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/java-action-info.hbs new file mode 100644 index 0000000..e74633d --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/java-action-info.hbs @@ -0,0 +1,52 @@ +{{! +* 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.captureOutput}}<li class="list-group-item"><b>Capture Output : </b><br/>{{hoveredAction.captureOutput}}</li>{{/if}} + {{#if hoveredAction.mainClass}}<li class="list-group-item"><b>Main Class : </b><br/>{{hoveredAction.mainClass}}</li>{{/if}} + {{#if hoveredAction.javaOpts}}<li class="list-group-item"><b>Java Opts : </b><br/>{{hoveredAction.javaOpts}}</li>{{/if}} + {{#if hoveredAction.javaOpt}}<li class="list-group-item"><b>Java Opt : </b> + {{#property-value-config action=hoveredAction.javaOpt}}{{/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.nameNode}}<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.params}}<li class="list-group-item"><b>Params : </b> + {{#property-value-config action=hoveredAction.params}}{{/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/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/java-action.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/java-action.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/java-action.hbs index c103bd0..bdb5261 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/java-action.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/java-action.hbs @@ -22,7 +22,7 @@ <label for="inputEmail" class="control-label col-xs-2">Main class<span class="requiredField"> *</span></label> <div class="col-xs-7"> {{input type="text" class="form-control" name="main-class" value=actionModel.mainClass placeholder="Main class"}} - {{field-error error=errors.actionModel.mainClass}} + {{field-error model=this field='actionModel.mainClass' showErrorMessage=showErrorMessage}} </div> </div> @@ -77,7 +77,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/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-config.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-config.hbs new file mode 100644 index 0000000..ede8cb1 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-config.hbs @@ -0,0 +1,126 @@ +{{! +* 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> + {{#if isDryrun}} + <h4 class="modal-title">Dryrun {{displayName}}</h4> + {{else}} + <h4 class="modal-title">Submit {{displayName}}</h4> + {{/if}} + + </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 + </div> + </div> + <div class="row"> + <div class="col-xs-3"> + <label class="control-label">Execution Settings</label> + </div> + <div class="col-xs-8"> + {{#each systemConfigs as |config|}} + <div> + {{input type="checkbox" checked=config.value}}{{config.displayName}} + </div> + {{/each}} + </div> + </div> + </div> + </div> + <div id="jobProperties"> + {{#if configMap.length}} + <div class="panel panel-default"> + <div class="panel-heading"> + Job Properties + </div> + <div class="panel-body"> + {{field-error model=this field='configMap' showErrorMessage=showErrorMessage}} + {{#each configMap as |prop|}} + <div class="row form-group"> + <div class="col-xs-3"> + <label class="control-label" for="{{prop}}">{{prop.name}}</label> + {{#if prop.isRequired}} + <span class="requiredField"> *</span> + {{/if}} + </div> + <div class="col-xs-8"> + {{input class="form-control" type="text" value=prop.value}} + </div> + </div> + {{/each}} + </div> + </div> + {{/if}} + </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}} + {{#if startingInProgress}} + {{spin-spinner lines=8 length=5 width=10 radius=5}} + <span class="pull-left">Starting {{displayName}}</span> + {{/if}} + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> + {{#if isDryrun}} + <button type="button" class="btn btn-primary" {{action "dryrun"}}>Test Run</button> + {{else}} + <button type="button" class="btn btn-default" {{action "dryrun"}}>Test Run</button> + <button type="button" class="btn btn-primary" {{action "save"}}>Submit</button> + {{/if}} + + </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/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-details.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-details.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-details.hbs index 872cdbb..0a04d25 100644 --- a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-details.hbs +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/job-details.hbs @@ -49,7 +49,7 @@ <li {{action 'getJobLog'}} role="presentation"><a href="#jobLog" aria-controls="jobLog" role="tab" data-toggle="tab">Log</a></li> <li {{action 'getErrorLog'}} role="presentation"><a href="#jobErrorLog" aria-controls="jobErrorLog" role="tab" data-toggle="tab">Error Log</a></li> <li {{action 'getAuditLog'}} role="presentation"><a href="#jobAuditLog" aria-controls="jobAuditLog" role="tab" data-toggle="tab">Audit Log</a></li> - <li {{action 'getJobDag'}} role="presentation"><a href="#jobDag" aria-controls="jobDag" role="tab" data-toggle="tab">DAG</a></li> + <li {{action 'getJobDag'}} role="presentation"><a href="#jobDag" aria-controls="jobDag" role="tab" data-toggle="tab">Flow Graph</a></li> <li role="presentation" class="pull-right"> {{#link-to 'design' (query-params appPath=model.appPath) class="backto-designer" }} <button type="button" class="btn btn-success" title="Back" > http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/killnode-config.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/killnode-config.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/killnode-config.hbs new file mode 100644 index 0000000..db24051 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/killnode-config.hbs @@ -0,0 +1,67 @@ +{{! +* 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="panel panel-default"> + <div class="panel-heading"> + {{#if editMode}} + Edit Kill Node + {{else}} + Add Kill Node + {{/if}} + </div> + <div class="panel-body"> + {{#if createKillnodeError}} + <div class="row"> + <div class="form-group"> + <label class="text-danger control-label col-xs-8"> + {{createKillnodeError}} + </label> + </div> + </div> + {{/if}} + <div class="row"> + <div class="form-group" id="killNodeName"> + <label class="control-label col-xs-3"> Kill node name</label> + {{#if editMode}} + <label class="control-label col-xs-3">{{killNode.name}}</label> + {{else}} + <div class="col-xs-7"> + {{input class="form-control" type="text" name="kill-node-name" value=killNode.name}} + </div> + {{/if}} + </div> + </div> + <div class="row padding10"> + <div class="form-group"> + <label class="control-label col-xs-3"> Kill message</label> + <div class="col-xs-7"> + {{textarea class="form-control" rows="5" placeholder="kill node message" name="kill-node-message" value=killNode.killMessage}} + </div> + </div> + </div> + </div> + <div class="panel-footer clearfix"> + <div class="pull-right"> + {{#if editMode}} + <button type="button" class="btn btn-primary" {{action "updateNode"}}>Save</button> + {{else}} + <button type="button" class="btn btn-primary" {{action "createKillNode"}}>Save</button> + {{/if}} + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> + </div> + </div> +</div> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/killnode-manager.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/killnode-manager.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/killnode-manager.hbs new file mode 100644 index 0000000..9b14cfc --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/killnode-manager.hbs @@ -0,0 +1,69 @@ +{{! +* 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="killnode-manager-dialog" 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">Kill Node Manager</h4> + </div> + <div class="modal-body"> + <div class="panel panel-default"> + <div class="panel-heading clearfix"> + <h4 class="panel-title pull-left paddingtop7">Kill Nodes</h4> + <button type="button" class="btn btn-default pull-right" {{action "addNode"}}>Add</button> + </div> + <div class="panel-body kill-nodes-list"> + <ul class="list-group"> + {{#each killNodes as |killNode index|}} + <li class="list-group-item col-xs-12"> + <div class="col-xs-12 plr0px"> + <label class="control-label col-xs-2"> + Name + </label> + <div class="col-xs-10"> + {{killNode.name}} + <span class="pull-right"> + <i class="fa fa-trash-o" title="Delete" {{action "deleteNode" index}}></i> + </span> + <span class="pull-right paddingright10"> + <i class="fa fa-pencil" title="Edit" {{action "editNode" index}}></i> + </span> + </div> + </div> + <div class="col-xs-12 plr0px"> + <label class="control-label col-xs-2"> + Message + </label> + <div class="col-xs-10"> + {{killNode.killMessage}} + </div> + </div> + </li> + {{/each}} + </ul> + </div> + </div> + + {{#if (or addKillNodeMode editMode)}} + {{killnode-config killNode=killNode createKillnodeError=createKillnodeError editMode=editMode updateNode="updateNode" createKillNode="createKillNode"}} + {{/if}} + </div> + </div> + </div> +</div> http://git-wip-us.apache.org/repos/asf/ambari/blob/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/map-reduce-action-info.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/map-reduce-action-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/map-reduce-action-info.hbs new file mode 100644 index 0000000..16d1b32 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/map-reduce-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"><b>The details are</b> + <a href="#" class="pull-right" {{action "hideNotification"}}>X</a></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.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/d1b0bb9e/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/name-value-info.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/name-value-info.hbs b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/name-value-info.hbs new file mode 100644 index 0000000..02f2499 --- /dev/null +++ b/contrib/views/wfmanager/src/main/resources/ui/app/templates/components/name-value-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.configuration.property as |obj|}} + <ul class="list-unstyled"> + <li>Name : {{obj.name}}, Value : {{obj.value}}</li> + </ul> +{{/each}}
