This repository has been archived by the owner on Jan 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit * endpoints (wip) * endpoints [wip] * Added flyOut for HCF * Moved goToEndpointsView to service-tile * added credentials flyout to login to cluster * Migated endpoints to /app & added hceRegistration factory * Added duplicate URL warning code to hce-registration factory * Include endpoints-dashboard.scss in view.scss * minor update * Created root endpoints state, split out generic endpoints pages into hce/hcf * Merged base-tile & service-tile * Admin operations are hidden to non-admin users * Refactored HCF Add cluster form to a detailView * Add jsdoc comments * Added basic clusters page, placeholder for cluster summary page * 720-Cluster tile view WIP - Updating branch with latest and not-quite greatest * 720-Cluster tile view WIP - Updating branch with latest and not-quite greatest - Wired in connect/disconnect/register/unregister - updated url of dashboard state from /endpoints/dashboard to /endpoints * 720-Cluster tile view WIP - Updating branch with latest and not-quite greatest - Created cf users model - Added user/org count to cluster tile * 720-Cluster tile view WIP - Fixed endpoint top menu button (location og register + selected state) - ux tweaks - admin only actions are now admin only * Added unit tests + Fixed flickering states issue + Minor peformance improvements + Migrated to action-menu * Fixed issue with drop down menu actions * Style updates for endpoints dashboard - use thin detail views * More styling updates * Style change to connect dialog to make it thinner. We really need to refactor all of these dialogs using a common pattern. * 720-Cluster tile view WIP - Added 'expired' alert - Added action-menu pos (requires PR 80 in helion-ui-framework to work) * Updated styles - endpoints now have root style + per section style - Clusters + HCE endpoint titles now back to bigger - Fixed welcome message * Add specific modules names back in * Trivial fix for unit test * 720-Cluster tile view WIP - Unit tests for cluster.tile * TEAMFOUR-124 - Added view for "no registered endpoints" case + Added confirmation dialog when unregistering an endpoint + Fixed an issue where the incorrect icon was being displayed for HCE * Decreased loading times when serviceInstanceModel is already initialised * 720-Cluster tile view WIP - Unit tests for clusters page - When a cluster is disconnected it can never be expired * Fixed typo * Fixed welcome-message in endpoints-view * Fixed lint errors, added jsdocs * Fixed linting issues. * Added gettext to action-menu items * Fixed some translation issues
- Loading branch information
1 parent
05eb568
commit ece1bf5
Showing
47 changed files
with
2,976 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
'use strict'; | ||
|
||
var helpers = require('../po/helpers.po'); | ||
var resetTo = require('../po/resets.po'); | ||
var loginPage = require('../po/login-page.po'); | ||
var endpointsDashboardPage = require('../po/endpoints-dashboard.po.js'); | ||
|
||
describe('Endpoints Dashboard', function() { | ||
|
||
describe('No clusters', function() { | ||
|
||
beforeAll(function() { | ||
browser.driver.wait(resetTo.zeroClusterAdminWorkflow()) | ||
.then(function() { | ||
helpers.setBrowserNormal(); | ||
helpers.loadApp(); | ||
loginPage.loginAsAdmin(); | ||
}); | ||
}); | ||
|
||
it('should show welcome endpoints page', function() { | ||
endpointsDashboardPage.showEndpoints(); | ||
expect(browser.getCurrentUrl()).toBe('http://' + helpers.getHost() + '/#/cf/applications/endpoints-dashboard'); | ||
expect(endpointsDashboardPage.welcomeMessage().isDisplayed()).toBeTruthy(); | ||
expect(endpointsDashboardPage.registerCloudFoundryTile().isDisplayed()).toBeTruthy(); | ||
expect(endpointsDashboardPage.registerCodeEngineTile().isDisplayed()).toBeTruthy(); | ||
}); | ||
|
||
it('should show add cluster form flyout when btn is pressed', function() { | ||
endpointsDashboardPage.showEndpoints(); | ||
endpointsDashboardPage.clickAddClusterInWelcomeMessage('hcf'); | ||
expect(endpointsDashboardPage.getAddClusterForm().isDisplayed()).toBeTruthy(); | ||
}); | ||
|
||
it('should show add cluster form detail view when btn is pressed', function() { | ||
endpointsDashboardPage.showEndpoints(); | ||
endpointsDashboardPage.clickAddClusterInWelcomeMessage('hce'); | ||
expect(endpointsDashboardPage.getAddEndpointFlyout().isDisplayed()).toBeTruthy(); | ||
}); | ||
|
||
it('should show add cluster form detail view when tile btn is pressed', function() { | ||
endpointsDashboardPage.showEndpoints(); | ||
endpointsDashboardPage.clickAddClusterInTille('hcf'); | ||
expect(endpointsDashboardPage.getAddClusterForm().isDisplayed()).toBeTruthy(); | ||
}); | ||
|
||
it('should show add cluster form detail view when tile btn is pressed', function() { | ||
endpointsDashboardPage.showEndpoints(); | ||
endpointsDashboardPage.clickAddClusterInTille('hce'); | ||
expect(endpointsDashboardPage.getAddEndpointFlyout().isDisplayed()).toBeTruthy(); | ||
}); | ||
|
||
}); | ||
|
||
describe('With clusters', function() { | ||
|
||
beforeAll(function() { | ||
browser.driver.wait(resetTo.nClustersAdminWorkflow()) | ||
.then(function() { | ||
helpers.setBrowserNormal(); | ||
helpers.loadApp(); | ||
loginPage.loginAsAdmin(); | ||
}); | ||
}); | ||
|
||
it('should show welcome endpoints page', function() { | ||
endpointsDashboardPage.showEndpoints(); | ||
expect(browser.getCurrentUrl()).toBe('http://' + helpers.getHost() + '/#/cf/applications/endpoints-dashboard'); | ||
expect(endpointsDashboardPage.welcomeMessage().isDisplayed()).toBeFalsy(); | ||
expect(endpointsDashboardPage.registerCloudFoundryTile().isDisplayed()).toBeFalsy(); | ||
expect(endpointsDashboardPage.registerCodeEngineTile().isDisplayed()).toBeFalsy(); | ||
}); | ||
|
||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
'use strict'; | ||
|
||
var navbar = require('./navbar.po'); | ||
|
||
module.exports = { | ||
showEndpoints: showEndpoints, | ||
clickAddClusterInWelcomeMessage: clickAddClusterInWelcomeMessage, | ||
clickAddClusterInTille: clickAddClusterInTille, | ||
welcomeMessage: welcomeMessage, | ||
registerCloudFoundryTile: registerCloudFoundryTile, | ||
registerCodeEngineTile: registerCodeEngineTile, | ||
getAddEndpointFlyout: getAddEndpointFlyout, | ||
getAddClusterForm: getAddClusterForm, | ||
getBaseTile: getBaseTile | ||
}; | ||
|
||
function showEndpoints() { | ||
navbar.goToView('Endpoints'); | ||
} | ||
|
||
function welcomeMessage() { | ||
return element(by.id('welcome-message')); | ||
} | ||
|
||
function clickAddClusterInWelcomeMessage(serviceType) { | ||
if (serviceType === 'hcf') { | ||
return driver.findElement(by.linkText('register Cloud Foundry clusters')).click(); | ||
} else { | ||
return driver.findElement(by.linkText('Code Engine endpoints')).click(); | ||
} | ||
} | ||
|
||
function clickAddClusterInTille(serviceType) { | ||
if (serviceType === 'hcf') { | ||
return driver.findElement(by.linkText('Register a Cluster')).click(); | ||
} else { | ||
return driver.findElement(by.linkText('Register an Endpoint')).click(); | ||
} | ||
} | ||
|
||
function registerCloudFoundryTile() { | ||
return getNoInstanceTile('hcf)'); | ||
} | ||
|
||
function registerCodeEngineTile() { | ||
return getNoInstanceTile('hce)'); | ||
} | ||
|
||
function getNoInstanceTile(serviceType) { | ||
return element(by.id(serviceType + '-no-instances-tile')); | ||
} | ||
|
||
function getAddEndpointFlyout() { | ||
return element(by.tagName('add-cluster-form')); | ||
} | ||
|
||
function getAddClusterForm() { | ||
return element(by.css('hce-registration')); | ||
} | ||
|
||
function getBaseTile(serviceType) { | ||
return element(by.tagName('base-tile')); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 29 additions & 25 deletions
54
src/app/view/cluster-registration/add-cluster-form/add-cluster-form.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
add-cluster-form { | ||
display: flex; | ||
justify-content: center; | ||
|
||
.add-cluster-form { | ||
max-width: 350px; | ||
|
||
h2 { | ||
margin-top: $hpe-unit-space * 2.5; | ||
} | ||
} | ||
.add-cluster-form { | ||
margin: 0 $hpe-unit-space * 5; | ||
|
||
form { | ||
margin-top: $hpe-unit-space; | ||
|
||
.form-group { | ||
width: 100%; | ||
.form-actions { | ||
margin-top: $hpe-unit-space * 2; | ||
text-align: right; | ||
padding: $hpe-unit-space 0 0 0; | ||
border-top: 1px solid #e5e5e5; | ||
} | ||
} | ||
// | ||
//h2 { | ||
// margin-top: $hpe-unit-space * 2.5; | ||
//} | ||
// | ||
//form { | ||
// margin-top: $hpe-unit-space; | ||
// | ||
// .form-group { | ||
// width: 100%; | ||
// } | ||
//} | ||
|
||
.alert-danger { | ||
margin-top: $hpe-unit-space; | ||
} | ||
|
||
.form-actions { | ||
display: flex; | ||
justify-content: flex-end; | ||
margin-top: $hpe-unit-space; | ||
|
||
button:not(:first-child) { | ||
margin-left: $hpe-unit-space / 4; | ||
} | ||
} | ||
// | ||
//.form-actions { | ||
// display: flex; | ||
// justify-content: flex-end; | ||
// margin-top: $hpe-unit-space; | ||
// | ||
// button:not(:first-child) { | ||
// margin-left: $hpe-unit-space / 4; | ||
// } | ||
//} | ||
} |
Oops, something went wrong.