Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-15546 Save button disabled at certain states #9891

Merged
merged 1 commit into from Apr 28, 2017

Conversation

@miguelvazq
Copy link
Member

commented Apr 20, 2017

The change cluster drop down is enabled when a workunit is blocked but the save button is not.

Signed-off by: Miguel Vazquez miguel.vazquez@lexisnexis.com

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change is a breaking change (fix or feature that will cause existing behavior to change).
  • This change alters the query API (existing queries will have to be recompiled)

Checklist:

  • My code follows the code style of this project.
    • My code does not create any new warnings from compiler, build system, or lint.
  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit is signed.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the CONTRIBUTORS document.
  • The change has been fully tested:
    • I have added tests to cover my changes.
    • All new and existing tests passed.
    • I have checked that this change does not introduce memory leaks.
    • I have used Valgrind or similar tools to check for potential issues.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Premature optimization
    • Existing deployed queries will not be broken
    • This change fixes the problem, not just the symptom
    • The target branch of this pull request is appropriate for such a change.
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised JIRA issues to address them separately
  • This is a user interface / front-end modification
    • I have tested my changes in multiple modern browers
    • The component(s) render as expected

Testing:

@hpcc-jirabot

This comment has been minimized.

Copy link

commented Apr 20, 2017

@miguelvazq

This comment has been minimized.

Copy link
Member Author

commented Apr 20, 2017

@GordonSmith Please review.

@@ -559,7 +559,7 @@ define([
refreshActionState: function () {
var isArchived = this.wu.get("Archived");
this.setDisabled(this.id + "AutoRefresh", isArchived || this.wu.isComplete(), "iconAutoRefresh", "iconAutoRefreshDisabled");
registry.byId(this.id + "Save").set("disabled", isArchived || !this.wu.isComplete() || this.wu.isDeleted());
registry.byId(this.id + "Save").set("disabled", isArchived || !this.wu.isComplete() || this.wu.isDeleted() || !this.wu.isBlocked());

This comment has been minimized.

Copy link
@GordonSmith

GordonSmith Apr 21, 2017

Member

Is the goal to enable the save button while the WU is blocked but incomplete? If so should it be:
isArchived || (!this.wu.isComplete() && !this.wu.isBlocked()) || this.wu.isDeleted()
?

@miguelvazq miguelvazq force-pushed the miguelvazq:HPCC-15546 branch from 8697d50 to 6eb32d9 Apr 24, 2017
@miguelvazq

This comment has been minimized.

Copy link
Member Author

commented Apr 24, 2017

@GordonSmith Updated.

@@ -559,7 +559,7 @@ define([
refreshActionState: function () {
var isArchived = this.wu.get("Archived");
this.setDisabled(this.id + "AutoRefresh", isArchived || this.wu.isComplete(), "iconAutoRefresh", "iconAutoRefreshDisabled");
registry.byId(this.id + "Save").set("disabled", isArchived || !this.wu.isComplete() || this.wu.isDeleted());
registry.byId(this.id + "Save").set("disabled", isArchived || !this.wu.isComplete() && !this.wu.isBlocked() || this.wu.isDeleted());

This comment has been minimized.

Copy link
@GordonSmith

GordonSmith Apr 25, 2017

Member

This line is fine - but I had to double check the operator precedence to be sure (https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Operator_Precedence) - the following would be easier to read (for me):

registry.byId(this.id + "Save").set("disabled", isArchived || (!this.wu.isComplete() && !this.wu.isBlocked()) || this.wu.isDeleted());
The change cluster drop down is enabled when a workunit is blocked but the save button is not.

Signed-off by: Miguel Vazquez <miguel.vazquez@lexisnexis.com>
@miguelvazq miguelvazq force-pushed the miguelvazq:HPCC-15546 branch from 6eb32d9 to f87ceca Apr 25, 2017
@miguelvazq

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2017

@GordonSmith Changes made.

@HPCCSmoketest

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2017

Automated Smoketest:
Sha: f87ceca
Build: success
ECL Watch: Rebuilding Site

errors warnings build time
0 65 92.466 seconds

Install hpccsystems-platform-community_6.3.0-trunk0.el7.x86_64.rpm
HPCC Start: OK

Unit tests result:

Test total passed failed errors timeout
unittest 93 93 0 0 0
wutoolTest(Dali) 19 19 0 0 0
wutoolTest(Cassandra) 19 19 0 0 0

Regression test result:

phase total pass fail
setup (hthor) 10 10 0
setup (thor) 10 10 0
setup (roxie) 10 10 0
test (hthor) 722 722 0
test (thor) 617 617 0
test (roxie) 746 746 0

HPCC Stop: OK
HPCC Uninstall: OK

Copy link
Member

left a comment

Looks good.

@miguelvazq

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2017

@richardkchapman This is ready to merge.

@richardkchapman richardkchapman merged commit dc48a84 into hpcc-systems:candidate-6.4.0 Apr 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.