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

Add new features for the ui of the vic plugin auto install functionality #1790

Merged

Conversation

lmalvins
Copy link
Contributor

@lmalvins lmalvins commented May 24, 2018

Fix:vmware/vic-ui#465

This PR includes a new modal for plugin installation which includes an ajax call to the server to get the thumbprint.

Installing for the first time and success message
first_time_success_message

VC validation failed
thumbprint_fail

Wrong credentials
wrong_credentials

Canceling plugin installation
cancel_install

Succes unit test example (jasmine + karma runner):
success

Failed unit test example (jasmine + karma runner):
failed

User Statement:

As a user, I want to be able to manage VIC UI plugin auto install.

Details:

Acceptance Criteria:

  • Add new modal which shows the fingerprint with a cancel and continue button
  • Add an ajax call to get the thumbprint from vcenter
  • Add call to the API for plugin install
  • UX review
  • Display success/error messages from auto install
  • Alert to restart services
  • Add unit testing framework
  • Add unit tests

@ghost ghost requested review from a user and jak-atx May 24, 2018 20:06
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to revert the changes to the Init* variables, but their than that, this looks good!

@@ -30,35 +29,38 @@
</div>
</header>
<main class="content-container">
<div class="content-area">
<div id="getting-started-items-container">
{{if .InitErrorFeedback }}
Copy link

@ghost ghost May 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep this variable here - it can be populated by messages other than those which you have put here.

<div class="alert-item">
<span class="alert-text">{{ .InitErrorFeedback }}</span>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

<div class="alert-actions">
<a href="/?login=true" title="Login" class="alert-action">Re-initialize</a>
</div>
</div>
</div>
{{ end }}
{{if .InitSuccessFeedback }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, please!

<div class="alert-item">
<span class="alert-text">{{ .InitSuccessFeedback }}</span>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, please!

$loginSpinner.style.display = '';
setTimeout(function() {
$vc = document.getElementById('target').value;
getThumbprint($vc,function (thumbprint,status) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@lmalvins lmalvins changed the title [WIP] Add new features for the ui of the vic plugin auto install functionality Add new features for the ui of the vic plugin auto install functionality May 25, 2018
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Please make sure to squash your changes before merging.

</div>
</div>
{{ end }}
<div id="feedback-alert-error" class="alert alert-danger mt-0" style="display: none">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this?

</body>

</html>
</html>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add line break

$pluginSpinner.style.display = '';
setTimeout(function() {
$loginForm.submit();
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setTimeout should have a second parameter for the timeout interval

$vc = document.getElementById('target').value;
getThumbprint($vc,function (thumbprint,status) {

if (status ===200){
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: fix spacing

xhr.onreadystatechange = function() {
callback(xhr.response,xhr.status);
};
xhr.send();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make sure we cross-browser test all of this since we aren't using any libraries

Copy link

@jak-atx jak-atx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few small comments. Also, the functions in this page should include at least some basic unit testing.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with unit tests, one small comment.

{{if .InitSuccessFeedback }}
<div id="feedback-alert" class="alert alert-success">
<div class="alert-item">
<span class="alert-text">{{ .InitSuccessFeedback }}, please restart the vSphere client services</span>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the , please restart the vSphere client services, it will be populated on the backend.

@ghost ghost requested a review from lweitzman June 4, 2018 16:55
@ghost ghost force-pushed the feature/auto-vic-ui-plugin branch from 36a27b3 to 5253c52 Compare June 4, 2018 20:24
Copy link

@lweitzman lweitzman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@lmalvins lmalvins force-pushed the feature/auto-vic-ui-plugin branch from 2c8d734 to c001e6b Compare June 5, 2018 14:01
@ghost ghost merged commit a13a244 into vmware:feature/auto-vic-ui-plugin Jun 5, 2018
ghost pushed a commit that referenced this pull request Jun 6, 2018
Adds a new modal for thumbprint validation to the 
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
ghost pushed a commit that referenced this pull request Jun 6, 2018
Adds a new modal for thumbprint validation to the 
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit to wjun/vic-product that referenced this pull request Aug 20, 2018
Adds a new modal for thumbprint validation to the 
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit to wjun/vic-product that referenced this pull request Aug 22, 2018
Adds a new modal for thumbprint validation to the 
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
zjs pushed a commit that referenced this pull request Aug 23, 2018
Adds a new modal for thumbprint validation to the 
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit that referenced this pull request Aug 27, 2018
Adds a new modal for thumbprint validation to the 
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit that referenced this pull request Aug 29, 2018
Adds a new modal for thumbprint validation to the 
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit that referenced this pull request Aug 29, 2018
Adds a new modal for thumbprint validation to the 
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit that referenced this pull request Aug 30, 2018
Adds a new modal for thumbprint validation to the
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit that referenced this pull request Aug 30, 2018
Adds a new modal for thumbprint validation to the
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit that referenced this pull request Aug 30, 2018
Adds a new modal for thumbprint validation to the
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit that referenced this pull request Aug 30, 2018
Adds a new modal for thumbprint validation to the
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit that referenced this pull request Aug 31, 2018
Adds a new modal for thumbprint validation to the
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
wjun pushed a commit that referenced this pull request Aug 31, 2018
Adds a new modal for thumbprint validation to the
Getting Started Page in the Fileserver.
Fixes vmware/vic-ui#465
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants