-
Notifications
You must be signed in to change notification settings - Fork 357
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
Add Smart Jdbc driver defaults #876
Conversation
Checked commits https://github.com/mtho11/manageiq-ui-classic/compare/80b93afe964e935e1db393ca67d69cd7eab73173~...a6ca0d2ff29860262f0a21988fe6fcd49d858130 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@miq-bot add_label middleware, enhancement |
@mtho11 unrecognized command 'middleware', ignoring... Accepted commands are: add_label, assign, close_issue, move_issue, remove_label, rm_label, set_milestone |
@miq-bot add_label middleware, enhancement |
very nice. where are the defaults taken from? |
@@ -121,11 +122,32 @@ function MwServerControllerFactory($scope, miqService, isGroupDeployment) { | |||
$scope.resetJdbcDriverForm = function () { | |||
$scope.jdbcDriverModel = {}; | |||
$scope.jdbcDriverModel.serverId = angular.element('#server_id').val(); | |||
$scope.jdbcDriverModel.xaDatasource = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is XA default = true?
@@ -195,7 +217,7 @@ function ServerGroupOpsService($http, $q) { | |||
|
|||
function ServerOpsServiceFactory($http, $q, isGroup) { | |||
var runOperation = function runOperation(id, operation, timeout) { | |||
var errorMsg = isGroup ? _('Error running operation on this server.') | |||
var errorMsg = isGroup ? _('Error running operation on this server.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this just a formatting change? if so, it should not be part of this commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, sorry about that.
%label.col-md-4.control-label{:for => "choose_datasource_input"} | ||
= _("Datasource:") | ||
.col-md-8 | ||
%select.form-control#chooose_driver_ds{"name" => "choose_driver_ds_input", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like a comment - is this a github issue? (the choose driver part above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is a github issue as the #choose_driver_ds
is the actual id
function MwServerController($scope, miqService) { | ||
return MwServerControllerFactory($scope, miqService, false); | ||
function MwServerController($scope, miqService, mwAddDatasourceService) { | ||
return MwServerControllerFactory($scope, miqService, mwAddDatasourceService, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the false (and the true in line 36) parameter standing for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That comes from function MwServerControllerFactory($scope, miqService, mwAddDatasourceService, isGroupDeployment)
so it is just a flag to tell the factory whether we are dealing with Servers or ServerGroups while maintaining the same Factory signature.
@abonas defaults were taken from WildFly/EAP 7. |
@abonas totally agree with the formatting changes separate. |
what I meant is where are they now kept in miq? |
thanks. although not part of this PR, I am wondering - why is a service under the controllers folder and not in the services folder? |
LGTM |
@miq-bot add_label fine/yes |
Add Smart Jdbc driver defaults (cherry picked from commit a63ff3c)
Fine backport details:
|
@miq-bot add_label angular dialogs |
This adds intelligent defaults when Adding JDBC Driver instead of having to know what the options are to key in.
Here is the old(current) Add JDBC Driver screen:
We really can't do much here as far as validations because the above scenario is correct -- so there needs to be very loose validation. To counter this, we will provide intelligent defaults instead. This eliminates the need to look up these values and is consistent with the Add Datasource screens as they use the same services.
The new screen with intelligent defaults:
This also brings it in alignment with the Add Datasource wizard.
Links