Merge pull request #3185 from mabashian/edit-node-arrow

Use arrow instead of 'to' in workflow edit link title

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot]
2019-02-11 14:51:05 +00:00
committed by GitHub
3 changed files with 22 additions and 4 deletions

View File

@@ -1,4 +1,6 @@
<div class="WorkflowMaker-formTitle">{{readOnly ? strings.get('workflow_maker.VIEW_LINK') : (linkConfig.mode === 'add' ? strings.get('workflow_maker.ADD_LINK') : strings.get('workflow_maker.EDIT_LINK')) }} | {{linkConfig.source.name}} {{linkConfig.target ? 'to ' + linkConfig.target.name : ''}}</div> <div class="WorkflowMaker-formTitle">
{{readOnly ? strings.get('workflow_maker.VIEW_LINK') : (linkConfig.mode === 'add' ? strings.get('workflow_maker.ADD_LINK') : strings.get('workflow_maker.EDIT_LINK')) }} | {{linkConfig.source.name}} {{linkConfig.target ? '&rarr; ' + linkConfig.target.name : ''}}
</div>
<div class="WorkflowMaker-form"> <div class="WorkflowMaker-form">
<div class="form-group Form-formGroup Form-formGroup--singleColumn"> <div class="form-group Form-formGroup Form-formGroup--singleColumn">
<div ng-show="linkConfig.mode === 'add' && !linkConfig.target">{{:: strings.get('workflow_maker.NEW_LINK')}}</div> <div ng-show="linkConfig.mode === 'add' && !linkConfig.target">{{:: strings.get('workflow_maker.NEW_LINK')}}</div>

View File

@@ -15,7 +15,7 @@
<div class="row" ng-show="wf_maker_templates.length === 0 && !(searchTags | isEmpty)"> <div class="row" ng-show="wf_maker_templates.length === 0 && !(searchTags | isEmpty)">
<div class="col-lg-12 List-searchNoResults" translate>No records matched your search.</div> <div class="col-lg-12 List-searchNoResults" translate>No records matched your search.</div>
</div> </div>
<div class="List-noItems" ng-show="wf_maker_templates.length === 0 && (searchTags | isEmpty)">PLEASE ADD ITEMS TO THIS LIST</div> <div class="List-noItems" ng-show="wf_maker_templates.length === 0 && (searchTags | isEmpty)" translate>PLEASE ADD ITEMS TO THIS LIST</div>
<div class="list-table-container" ng-show="wf_maker_templates.length > 0"> <div class="list-table-container" ng-show="wf_maker_templates.length > 0">
<div id="templates_table" class="List-table" is-extended="false"> <div id="templates_table" class="List-table" is-extended="false">
<div class="List-lookupLayout List-tableHeaderRow"> <div class="List-lookupLayout List-tableHeaderRow">

View File

@@ -426,7 +426,10 @@ export default ['$scope', 'TemplatesService',
$scope.graphState.nodeBeingAdded = workflowMakerNodeIdCounter; $scope.graphState.nodeBeingAdded = workflowMakerNodeIdCounter;
$scope.graphState.arrayOfLinksForChart.push({ $scope.graphState.arrayOfLinksForChart.push({
source: {id: parent.id}, source: {
id: parent.id,
unifiedJobTemplate: parent.unifiedJobTemplate
},
target: {id: workflowMakerNodeIdCounter}, target: {id: workflowMakerNodeIdCounter},
edgeType: "placeholder" edgeType: "placeholder"
}); });
@@ -461,7 +464,10 @@ export default ['$scope', 'TemplatesService',
$scope.graphState.nodeBeingAdded = workflowMakerNodeIdCounter; $scope.graphState.nodeBeingAdded = workflowMakerNodeIdCounter;
$scope.graphState.arrayOfLinksForChart.push({ $scope.graphState.arrayOfLinksForChart.push({
source: {id: link.source.id}, source: {
id: link.source.id,
unifiedJobTemplate: link.source.unifiedJobTemplate
},
target: {id: workflowMakerNodeIdCounter}, target: {id: workflowMakerNodeIdCounter},
edgeType: "placeholder" edgeType: "placeholder"
}); });
@@ -502,6 +508,7 @@ export default ['$scope', 'TemplatesService',
$scope.graphState.arrayOfLinksForChart.map( (link) => { $scope.graphState.arrayOfLinksForChart.map( (link) => {
if (link.target.id === nodeId) { if (link.target.id === nodeId) {
link.edgeType = edgeType.value; link.edgeType = edgeType.value;
link.target.unifiedJobTemplate = selectedTemplate;
} }
}); });
} }
@@ -511,6 +518,15 @@ export default ['$scope', 'TemplatesService',
nodeRef[$scope.nodeConfig.nodeId].promptData = _.cloneDeep(promptData); nodeRef[$scope.nodeConfig.nodeId].promptData = _.cloneDeep(promptData);
nodeRef[$scope.nodeConfig.nodeId].isEdited = true; nodeRef[$scope.nodeConfig.nodeId].isEdited = true;
$scope.graphState.nodeBeingEdited = null; $scope.graphState.nodeBeingEdited = null;
$scope.graphState.arrayOfLinksForChart.map( (link) => {
if (link.target.id === nodeId) {
link.target.unifiedJobTemplate = selectedTemplate;
}
if (link.source.id === nodeId) {
link.source.unifiedJobTemplate = selectedTemplate;
}
});
} }
} }