From a92be8c1f8912dc222d4f14bb81d4da2c35d7db6 Mon Sep 17 00:00:00 2001 From: Ramesh Kumar <ramesh.p@matriotsolutions.com> Date: Wed, 10 Nov 2021 00:38:29 +0530 Subject: [PATCH] TMSS-1075: Updated tooltip and messages --- .../routes/Scheduling/SchedulingUnitList.js | 43 +++++++++---------- .../routes/Scheduling/ViewSchedulingUnit.js | 40 ++++++++--------- 2 files changed, 41 insertions(+), 42 deletions(-) diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js index aeea451faf1..dc3a1011498 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js @@ -1536,12 +1536,12 @@ class SchedulingUnitList extends Component{ this.suBlueprintList = _.filter(this.selectedRows, (schedulingUnit) => { return schedulingUnit.status === "error" || schedulingUnit.status === "cancelled"}); if (this.suBlueprintList.length === 0) { - appGrowl.show({severity: 'info', summary: 'Select Row', detail: 'Please select one or more Scheduling Unit Blueprint(s) which has the status "Error/Cancelled"'}); + appGrowl.show({severity: 'info', summary: 'Select Row', detail: 'Please select one or more Scheduling Unit Blueprint(s) with status as "Error/Cancelled"'}); } else { let dialog = this.state.dialog; dialog.type = "confirmation"; - dialog.header= "Confirm to create Re-run for all failed pipelines"; - dialog.detail = "Do you want to create Re-run for all failed pipelines for the selected Scheduling Unit Blueprint(s)?"; + dialog.header= "Confirm to re-run all failed tasks"; + dialog.detail = "Do you want to re-run all failed tasks of the selected Scheduling Unit Blueprint(s)?"; dialog.content = this.getCopyFailedTasksDlgContent; dialog.actions = [{id: 'yes', title: 'Yes', callback: this.copyFailedTasks, className:(this.props.project)?"dialog-btn": ""}, {id: 'no', title: 'No', callback: this.closeDialog, className:(this.props.project)?"dialog-btn": ""}]; @@ -1551,7 +1551,7 @@ class SchedulingUnitList extends Component{ this.setState({dialog: dialog, dialogVisible: true}); } } else { - appGrowl.show({severity: 'info', summary: 'Select Row', detail: 'Please select one or more Scheduling Unit Blueprint(s)'}); + appGrowl.show({severity: 'info', summary: 'Select Row', detail: 'Please select one or more Scheduling Unit Blueprint(s) with status as "Error/Cancelled"'}); } } @@ -1572,7 +1572,7 @@ class SchedulingUnitList extends Component{ return <> {selectedSchedulingUnits.length > 0 && <div style={{marginTop: '1em'}}> - <b>Scheduling Unit(s) list to create Re-run for all failed pipelines</b> + <b>Failed tasks will be created and executed for these Scheduling Unit(s) with status 'Error' / 'Cancelled'</b> <DataTable value={selectedSchedulingUnits} resizableColumns columnResizeMode="expand" className="card" style={{paddingLeft: '0em'}}> <Column field="suId" header="Id"></Column> <Column field="suName" header="Name"></Column> @@ -1582,7 +1582,7 @@ class SchedulingUnitList extends Component{ } {unselectedSchedulingUnits.length > 0 && <div style={{marginTop: '1em'}}> - <b>Scheduling Unit(s) that will be ignored to create Re-run for all failed pipelines</b> + <b>Scheduling Unit(s) with status other than 'Error' / 'Cancelled' will be ignored</b> <DataTable value={unselectedSchedulingUnits} resizableColumns columnResizeMode="expand" className="card" style={{paddingLeft: '0em'}}> <Column field="suId" header="Id"></Column> <Column field="suName" header="Name"></Column> @@ -1616,7 +1616,7 @@ class SchedulingUnitList extends Component{ this.setState({showSpinner: false}); let dialog = this.state.dialog; dialog.type = "success"; - dialog.header= "Create Rerun Pipeline Task for Failed Task Status"; + dialog.header= "Re-run all failed tasks - Status"; dialog.detail = ""; dialog.content = this.getStatusContent; dialog.actions = [{id: 'no', title: 'Close', callback: this.closeDialog, className:(this.props.project)?"dialog-btn": ""}]; @@ -1636,8 +1636,8 @@ class SchedulingUnitList extends Component{ this.suBlueprintList = this.selectedRows; let dialog = this.state.dialog; dialog.type = "confirmation"; - dialog.header= "Confirm to update Scheduling Unit Blueprint and Subtasks Graph"; - dialog.detail = "Do you want to update the selected Scheduling Unit Blueprint(s) and it's Subtasks Graph from Task Drafts?"; + dialog.header= "Confirm to update blueprints from draft"; + dialog.detail = "Do you want to update selected scheduling unit blueprint(s) according to the changed and added task drafts?"; dialog.content = this.getUpdateSUBDialogContent; dialog.actions = [{id: 'yes', title: 'Yes', callback: this.updateSUB, className:(this.props.project)?"dialog-btn": ""}, {id: 'no', title: 'No', callback: this.closeDialog, className:(this.props.project)?"dialog-btn": ""}]; @@ -1667,7 +1667,7 @@ class SchedulingUnitList extends Component{ return <> {selectedSchedulingUnits.length > 0 && <div style={{marginTop: '1em'}}> - <b>Scheduling Unit(s) list to update Blueprint and it's Subtasks Graph from Task Drafts</b> + <b>Blueprints of these scheduling unit(s) with status 'Error' / 'Cancelled' will be updated</b> <DataTable value={selectedSchedulingUnits} resizableColumns columnResizeMode="expand" className="card" style={{paddingLeft: '0em'}}> <Column field="suId" header="Id"></Column> <Column field="suName" header="Name"></Column> @@ -1677,7 +1677,7 @@ class SchedulingUnitList extends Component{ } {unselectedSchedulingUnits.length > 0 && <div style={{marginTop: '1em'}}> - <b>Scheduling Unit(s) that will be ignored to update Blueprint and it's Subtasks Graph from Task Drafts</b> + <b>Scheduling Unit(s) with status other than 'Error' / 'Cancelled' will be ignored to update blueprints from task drafts</b> <DataTable value={unselectedSchedulingUnits} resizableColumns columnResizeMode="expand" className="card" style={{paddingLeft: '0em'}}> <Column field="suId" header="Id"></Column> <Column field="suName" header="Name"></Column> @@ -1700,7 +1700,6 @@ class SchedulingUnitList extends Component{ let response = null; response = await ScheduleService.updateSUBTasks(su); if(response.message === 'Success') { - await this.componentDidMount(); this.successSchedulingUnits.push({suId: su.id, suName: su.name, status: 'Success'}); } else { this.failedSchedulingUnits.push({suId: su.id, suName: su.name, status: 'Failed'}); @@ -1713,7 +1712,7 @@ class SchedulingUnitList extends Component{ this.setState({showSpinner: false}); let dialog = this.state.dialog; dialog.type = "success"; - dialog.header= "Update Scheduling Unit Blueprint & Subtasks Graph Status"; + dialog.header= "Update blueprints from draft - Status"; dialog.detail = ""; dialog.content = this.getStatusContent; dialog.actions = [{id: 'no', title: 'Close', callback: this.closeDialog, className:(this.props.project)?"dialog-btn": ""}]; @@ -1731,12 +1730,12 @@ class SchedulingUnitList extends Component{ this.suBlueprintList = _.filter(this.selectedRows, (schedulingUnit) => { return schedulingUnit.status === "error" || schedulingUnit.status === "cancelled"}); if (this.suBlueprintList.length === 0) { - appGrowl.show({severity: 'info', summary: 'Select Row', detail: 'Please select one or more Scheduling Unit Blueprint(s) which has the status "Error/Cancelled"'}); + appGrowl.show({severity: 'info', summary: 'Select Row', detail: 'Please select one or more Scheduling Unit Blueprint(s) with status "Error/Cancelled"'}); } else { let dialog = this.state.dialog; dialog.type = "confirmation"; - dialog.header= "Confirm to Create Draft Copy for Failed Tasks"; - dialog.detail = "For the selected Scheduling Unit Blueprint(s), do you want to create draft copy for failed tasks?"; + dialog.header= "Confirm to create draft copy for failed tasks"; + dialog.detail = "Do you want to create draft copy for failed tasks of the selected Scheduling Unit Blueprint(s)?"; dialog.content = this.getUpdateSUBDialogContent; dialog.actions = [{id: 'yes', title: 'Yes', callback: this.copySpecAndFailedTasks}, {id: 'no', title: 'No', callback: this.closeDialog}]; @@ -1746,7 +1745,7 @@ class SchedulingUnitList extends Component{ this.setState({dialog: dialog, dialogVisible: true}); } } else { - appGrowl.show({severity: 'info', summary: 'Select Row', detail: 'Please select one or more Scheduling Unit Blueprint(s)'}); + appGrowl.show({severity: 'info', summary: 'Select Row', detail: 'Please select one or more Scheduling Unit Blueprint(s) with status Error/Cancelled'}); } } @@ -1773,7 +1772,7 @@ class SchedulingUnitList extends Component{ this.setState({showSpinner: false}); let dialog = this.state.dialog; dialog.type = "success"; - dialog.header= "Update Scheduling Unit Blueprint(s) Status"; + dialog.header= "Create copy for failed tasks - Status"; dialog.detail = ""; dialog.content = this.getStatusContent; dialog.actions = [{id: 'no', title: 'Close', callback: this.closeDialog, className:(this.props.project)?"dialog-btn": ""}]; @@ -1835,8 +1834,8 @@ class SchedulingUnitList extends Component{ <> <a href="#" style={{marginLeft: "5px"}} onClick={(e) => this.confirmCopyFailedTasks(e)} title={this.state.userrole && this.state.userrole.userRolePermission.scheduleunit && this.state.userrole.userRolePermission.scheduleunit.create_rerun - ?"Create Re-run for all failed pipelines" - :`${this.access_denied_message} to create Re-run for all failed pipelines`} > + ?"Re-run all failed tasks" + :`${this.access_denied_message} to re-run for all failed tasks`} > <i class={this.state.userrole && this.state.userrole.userRolePermission.scheduleunit && this.state.userrole.userRolePermission.scheduleunit.create_rerun?"fa fa-redo":"fa fa-disabled fa-redo"} aria-hidden="true" ></i> </a> @@ -1849,8 +1848,8 @@ class SchedulingUnitList extends Component{ </a> <a href="#" style={{marginLeft: "5px"}} onClick={(e) => this.confirmUpdateSUBlueprint(e)} title={this.state.userrole && this.state.userrole.userRolePermission.scheduleunit && this.state.userrole.userRolePermission.scheduleunit.update_sub - ? "Update Task Blueprint & Subtasks Graph from Draft" - :`${this.access_denied_message} to update Task Blueprint & Subtasks Graph from Draft`} > + ? "Update blueprints from draft" + :`${this.access_denied_message} to update blueprint from draft`} > <i class={this.state.userrole && this.state.userrole.userRolePermission.scheduleunit && this.state.userrole.userRolePermission.scheduleunit.update_sub?"fas fa-save":"fas fa-disabled fa-save"} aria-hidden="true" ></i> </a> diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/ViewSchedulingUnit.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/ViewSchedulingUnit.js index 4d8ac36f11a..69e87d7e8f2 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/ViewSchedulingUnit.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/ViewSchedulingUnit.js @@ -492,8 +492,8 @@ class ViewSchedulingUnit extends Component { this.actions.unshift({ icon: 'fas fa-save', title: userPermissions.scheduleunit && userPermissions.scheduleunit.update_sub? - 'Update Task Blueprint & Subtasks Graph from Draft' - :`${this.access_denied_message} to update Task Blueprint & Subtasks Graph from Draft`, + 'Update blueprints from draft' + :`${this.access_denied_message} to update blueprint from draft`, type: 'button', disabled: userPermissions.scheduleunit?!userPermissions.scheduleunit.update_sub:true, actOn: 'click', props: { callback: this.confirmUpdateSUBlueprint } @@ -503,7 +503,7 @@ class ViewSchedulingUnit extends Component { title: userPermissions.scheduleunit && userPermissions.scheduleunit.create_rerun ?(this.state.scheduleunit.status === 'error' || this.state.scheduleunit.status === 'cancelled') ?'Create draft copy for failed tasks' //If the SUB is valid to do this functionality - :'Create draft copy for failed tasks can do if the Scheduling Unit status is either Error/Cancelled' //If the SUB is not valid to do this functionality + :'Can create draft copy for failed tasks only if the Scheduling Unit status is either Error/Cancelled' //If the SUB is not valid to do this functionality :`${this.access_denied_message} to create draft copy for failed tasks`, //If the User doesn't have permission to do this functionality type: 'button', disabled: userPermissions.scheduleunit&& userPermissions.scheduleunit.create_rerun? @@ -514,9 +514,9 @@ class ViewSchedulingUnit extends Component { icon: 'fa fa-redo', title: userPermissions.scheduleunit && userPermissions.scheduleunit.create_rerun? (this.state.scheduleunit.status === 'error' || this.state.scheduleunit.status === 'cancelled') - ?'Create Re-run for all failed pipelines' - :'Re-run for all failed pipelines can be created if the Scheduling Unit status is either Error/Cancelled' - :`${this.access_denied_message} to create Re-run for all failed pipelines`, + ?'Re-run all failed tasks' + :'Can re-run all failed tasks if the Scheduling Unit status is either Error/Cancelled' + :`${this.access_denied_message} to re-run for all failed tasks`, type: 'button', disabled: userPermissions.scheduleunit && userPermissions.scheduleunit.create_rerun?!(this.state.scheduleunit.status === 'error' || this.state.scheduleunit.status === 'cancelled'):true, actOn: 'click', props: { callback: this.confirmCopyFailedTasks } @@ -1345,13 +1345,13 @@ class ViewSchedulingUnit extends Component { } /** - * Function to show confirmation before create Rerun Pipeline for Failed Tasks + * Function to show confirmation before create Re-run Failed Tasks */ async confirmCopyFailedTasks() { let dialog = this.state.dialog; dialog.type = "confirmation"; - dialog.header= "Create Rerun Pipeline for Failed Tasks"; - dialog.detail = " Do you want to create Re-run for all failed pipelines?"; + dialog.header= "Confirm to re-run all failed tasks"; + dialog.detail = "Do you want to re-run all failed tasks of this Scheduling Unit Blueprint?"; dialog.content = this.getCopyFailedTasksDlgContent; dialog.actions = [{id: 'yes', title: 'Yes', callback: this.copyFailedTasks}, {id: 'no', title: 'No', callback: this.closeDialog}]; @@ -1362,7 +1362,7 @@ class ViewSchedulingUnit extends Component { } /** - * Prepare dialog content before create Rerun Pipeline task + * Prepare dialog content before create Re-run failed tasks * Also this function re-used for Update SUB * @returns : return dialog content */ @@ -1383,7 +1383,7 @@ class ViewSchedulingUnit extends Component { } /** - * Function to create Rerun Pipeline + * Function to create Re-run failed tasks */ async copyFailedTasks() { let dialog = this.state.dialog; @@ -1396,11 +1396,11 @@ class ViewSchedulingUnit extends Component { await this.componentDidMount(); } catch(error) { this.statusUpdate = "Failed"; - console.log('Error while creating Re-run for all failed pipelines', error); + console.log('Error while re-run all failed tasks', error); } dialog.detail = ''; dialog.type = response.message === 'Success' ? "success":"warning"; - dialog.header= "Create Rerun Pipeline for all Failed Pipelines Status"; + dialog.header= "Re-run all failed tasks - Status"; dialog.content = this.getStatusContent; dialog.actions = [{id: 'no', title: 'Close', callback: this.closeDialog}]; dialog.onSubmit = this.closeDialog; @@ -1416,8 +1416,8 @@ class ViewSchedulingUnit extends Component { async confirmUpdateSUBlueprint() { let dialog = this.state.dialog; dialog.type = "confirmation"; - dialog.header= "Update Scheduling Unit Blueprint & Subtasks Graph"; - dialog.detail = "Do you want to update Scheduling Unit Blueprint & it's Subtasks Graph from Task Drafts?"; + dialog.header= "Confirm to update blueprints from draft"; + dialog.detail = "Do you want to update blueprints of the scheduling unit according to the changed and added task drafts?"; dialog.content = this.getCopyFailedTasksDlgContent; dialog.actions = [{id: 'yes', title: 'Yes', callback: this.updateSUB}, {id: 'no', title: 'No', callback: this.closeDialog}]; @@ -1440,11 +1440,11 @@ class ViewSchedulingUnit extends Component { await this.componentDidMount(); } catch(error) { this.statusUpdate = "Failed"; - console.log('Error while update Scheduling Unit Blueprint & Subtasks Graph from Task Drafts', error); + console.log('Error while updating Scheduling Unit Blueprint from Task Drafts', error); } dialog.detail = ''; dialog.type = response.message === 'Success' ? "success":"warning"; - dialog.header= "Update Scheduling Unit Blueprint & Subtasks Graph Status"; + dialog.header= "Update blueprints from draft - Status"; dialog.content = this.getStatusContent; dialog.actions = [{id: 'no', title: 'Close', callback: this.closeDialog}]; dialog.onSubmit = this.closeDialog; @@ -1459,8 +1459,8 @@ class ViewSchedulingUnit extends Component { async confirmCopySpecAndFailedTasks() { let dialog = this.state.dialog; dialog.type = "confirmation"; - dialog.header= "Confirm to Create Draft Copy for Failed Tasks"; - dialog.detail = "Do you want to create draft copy for failed tasks for this Scheduling Unit Blueprint?"; + dialog.header= "Confirm to create draft copy for failed tasks"; + dialog.detail = "Do you want to create draft copy for failed tasks of this Scheduling Unit Blueprint?"; dialog.content = this.getCopyFailedTasksDlgContent; dialog.actions = [{id: 'yes', title: 'Yes', callback: this.copySpecAndFailedTasks}, {id: 'no', title: 'No', callback: this.closeDialog}]; @@ -1486,7 +1486,7 @@ class ViewSchedulingUnit extends Component { } dialog.detail = ''; dialog.type = response.message === 'Success' ? "success":"warning"; - dialog.header= "Copy Specification Doc cor Failed Task Status"; + dialog.header= "Create copy for failed tasks - Status"; dialog.content = this.getStatusContent; dialog.actions = [{id: 'no', title: 'Close', callback: this.closeDialog}]; dialog.onSubmit = this.closeDialog; -- GitLab