summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views
diff options
context:
space:
mode:
authorhb123f <hbindu@research.att.com>2019-03-20 12:20:44 -0400
committerhb123f <hbindu@research.att.com>2019-03-20 14:13:55 -0400
commita70761c096192e38800bf38d6c7f61f52bf72007 (patch)
treecdc5264cec030bc7e677ff1d74c939c56ee51d0d /ecomp-portal-FE-common/client/app/views
parent3992004ee5f2b0b1635e2aef19c375db87079b52 (diff)
CADI AAF Integration and merging the code
Issue-ID: PORTAL-319 CADI AAF Integration and code merge Change-Id: I6e44f3b2741858d8d403b77a49ec9a0153084801 Signed-off-by: hb123f <hbindu@research.att.com>
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views')
-rw-r--r--ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.html6
-rw-r--r--ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.js6
-rw-r--r--ecomp-portal-FE-common/client/app/views/account-onboarding/account-onboarding.tpl.html8
-rw-r--r--ecomp-portal-FE-common/client/app/views/role/bulk-upload-dialogs/bulk-upload-role-functions-controller.js13
-rw-r--r--ecomp-portal-FE-common/client/app/views/role/role-list-controller.js12
-rw-r--r--ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.controller.js13
-rw-r--r--ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.modal.html2
-rw-r--r--ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js2
-rw-r--r--ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.controller.js38
-rw-r--r--ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.modal.html9
10 files changed, 87 insertions, 22 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.html b/ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.html
index 03d7d1c4..6e20703b 100644
--- a/ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.html
+++ b/ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.html
@@ -61,6 +61,10 @@ padding-bottom:15px;
.account-property{
padding-top:10px;
}
+
+.add-label-right{
+opacity: 0.6
+}
</style>
<div>
@@ -147,7 +151,7 @@ padding-top:10px;
<div class="add-endpoint-item">
<div class="item-label add-label-left">Add Endpoint</div>
<div class="icon-add add-label-right" id="accountAddDetails-button-accordion"
- ng-click="accountAddDetails.addEndpoint()"><span class="icon-primary-accordion-plus"></span></div>
+ ng-click="accountAddDetails.addEndpoint()" ng-disabled="true"><span class="icon-primary-accordion-plus"></span></div>
</div>
<div class="item">
<div class="item-label"
diff --git a/ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.js b/ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.js
index f92d2d22..d776656a 100644
--- a/ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.js
+++ b/ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.js
@@ -41,9 +41,11 @@
constructor($scope, $log, $interval, basicAuthAccountService, $modalInstance, errorMessageByCode, ECOMP_URL_REGEX, $window, confirmBoxService, $cookies,items) {
this.addEndpoint = () => {
- this.account.endpointList.push({
+ confirmBoxService.showInformation('Please add the roles to this Username/MechId through AAF Screen ').then(isConfirmed => {});
+ return;
+ /* this.account.endpointList.push({
valid: true
- });
+ }); */
}
let init = () => {
this.account = [];
diff --git a/ecomp-portal-FE-common/client/app/views/account-onboarding/account-onboarding.tpl.html b/ecomp-portal-FE-common/client/app/views/account-onboarding/account-onboarding.tpl.html
index 2dd4f98f..e4df68ed 100644
--- a/ecomp-portal-FE-common/client/app/views/account-onboarding/account-onboarding.tpl.html
+++ b/ecomp-portal-FE-common/client/app/views/account-onboarding/account-onboarding.tpl.html
@@ -67,8 +67,8 @@
b2b-table-header key="{{header.value}}"
sortable="{{header.isSortable}}">{{header.name}}</th>
- <th id="account-catalog-th-header-endpoints" b2b-table-header
- key="endpoints" sortable="false">Endpoints</th>
+ <!-- <th id="account-catalog-th-header-endpoints" b2b-table-header
+ key="endpoints" sortable="false">Endpoints</th> -->
<th id="account-catalog-th-header-delete" b2b-table-header
sortable="false">Delete</th>
@@ -85,7 +85,7 @@
ng-bind="rowData[header.value]"></div>
</td>
- <td b2b-table-body
+ <!-- <td b2b-table-body
ng-click="accountOnboarding.openAddNewAccountModal(rowData)">
<div ng-show="rowData.endpoints.length > 0">
<div ng-repeat="row in rowData.endpoints">
@@ -95,7 +95,7 @@
</div>
<div ng-hide="rowData.endpoints.length > 0">All
endpoints</div>
- </td>
+ </td> -->
<td b2b-table-body>
<div id="account-onboarding-div-delete-{{$index}}"
diff --git a/ecomp-portal-FE-common/client/app/views/role/bulk-upload-dialogs/bulk-upload-role-functions-controller.js b/ecomp-portal-FE-common/client/app/views/role/bulk-upload-dialogs/bulk-upload-role-functions-controller.js
index 722c634d..13036476 100644
--- a/ecomp-portal-FE-common/client/app/views/role/bulk-upload-dialogs/bulk-upload-role-functions-controller.js
+++ b/ecomp-portal-FE-common/client/app/views/role/bulk-upload-dialogs/bulk-upload-role-functions-controller.js
@@ -107,8 +107,17 @@
// Caches the file name supplied by the event handler.
$scope.fileChangeHandler = (event, files) => {
- this.fileSelected = true;
- this.fileToRead = files[0];
+ var fileName = files[0].name;
+ var validFormats = ['csv', 'txt'];
+ //Get file extension
+ var ext = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase();
+ //Check for valid format
+ if(validFormats.indexOf(ext) == -1){
+ this.fileSelected = false;
+ }else{
+ this.fileSelected = true;
+ this.fileToRead = files[0];
+ }
if (debug)
$log.debug("BulkRoleAndFunctionsModalCtrl::fileChangeHandler: file is ", this.fileToRead);
}; // file change handler
diff --git a/ecomp-portal-FE-common/client/app/views/role/role-list-controller.js b/ecomp-portal-FE-common/client/app/views/role/role-list-controller.js
index 0ae218c4..6f280313 100644
--- a/ecomp-portal-FE-common/client/app/views/role/role-list-controller.js
+++ b/ecomp-portal-FE-common/client/app/views/role/role-list-controller.js
@@ -170,14 +170,16 @@ app.controller('roleListController', function ($scope,RoleService, applicationsS
$scope.syncRolesFromExternalAuthSystem = function(appId){
applicationsService.syncRolesEcompFromExtAuthSystem(appId).then(function(res){
- if(res.status == 200){
+ if(res.data != null || res.data.status != null || res.data.status == 'OK'){
confirmBoxService.showInformation('Sync operation completed successfully!').then(isConfirmed => {
$scope.getRolesForSelectedCentralizedApp(appId);
});
} else{
- confirmBoxService.showInformation('Sync operation failed for '+app).then(isConfirmed => {});
+ confirmBoxService.showInformation('Sync operation failed for '+app + res.data.message).then(isConfirmed => {});
}
- });
+ }).catch(err=> {
+ confirmBoxService.showInformation("Sync operation failed for: " + err);
+ });
};
@@ -218,7 +220,7 @@ app.controller('roleListController', function ($scope,RoleService, applicationsS
// edit Role
$scope.editRoleModalPopup = function(appId, availableRole) {
if(!availableRole.active)
- return confirmBoxService.showInformation('Edit is disabled! Please toggle the role to activate it.').then(isConfirmed => {});
+ return confirmBoxService.showInformation('Edit is diabled! Please toggle the role to activate it.').then(isConfirmed => {});
$scope.editRole = availableRole;
if(appId != undefined && availableRole.id != undefined){
RoleService.getRole(appId, availableRole.id).then(function(data){
@@ -259,7 +261,7 @@ app.controller('roleListController', function ($scope,RoleService, applicationsS
// add Role
$scope.addRoleModalPopup = function(appId) {
if(appId){
- var roleId = 0;
+ var roleId = -1;
RoleService.getRole(appId, roleId).then(function(data){
var response = JSON.parse(data.data);
var role = JSON.parse(response.role);
diff --git a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.controller.js b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.controller.js
index 2e8018ec..718879a0 100644
--- a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.controller.js
@@ -134,8 +134,17 @@
// Caches the file name supplied by the event handler.
$scope.fileChangeHandler = (event, files) => {
- this.fileSelected = true;
- this.fileToRead = files[0];
+ var fileName = files[0].name;
+ var validFormats = ['csv', 'txt'];
+ //Get file extension
+ var ext = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase();
+ //Check for valid format
+ if(validFormats.indexOf(ext) == -1){
+ this.fileSelected = false;
+ }else{
+ this.fileSelected = true;
+ this.fileToRead = files[0];
+ }
if (debug)
$log.debug("BulkUserModalCtrl::fileChangeHandler: file is ", this.fileToRead);
}; // file change handler
diff --git a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.modal.html b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.modal.html
index e32497bf..88524466 100644
--- a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.modal.html
+++ b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.modal.html
@@ -67,7 +67,7 @@
ng-model="fileModel" />
<span>Browse...</span>
</label>{{selectedFile}}
- <div class="upload-instructions">File must have one entry per line with this format:
+ <div class="upload-instructions">File must be .csv or .txt and have one entry per line with this format:
<pre>orgUserId, role name</pre>
</div>
</div>
diff --git a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js
index 79cc8d36..512c3a0c 100644
--- a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js
@@ -193,7 +193,7 @@
this.numberAppsSucceeded++;
}).catch(err => {
$log.error(err);
- var errorMessage = 'Failed to update the user application roles: ' + err.status;
+ var errorMessage = 'Failed to update the user application roles: ' + err;
if(err.status == 504){
this.numberAppsSucceeded++;
errorMessage = 'Request is being processed, please check back later!';
diff --git a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.controller.js b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.controller.js
index b6429015..bf0df9f0 100644
--- a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.controller.js
@@ -38,7 +38,7 @@
'use strict';
(function () {
class WidgetOnboardingDetailsModalCtrl {
- constructor($scope, $log, $interval, applicationsService, adminsService, microserviceService, widgetsCatalogService, errorMessageByCode, ECOMP_URL_REGEX, $window,userProfileService, confirmBoxService, $cookies,items) {
+ constructor($scope, $timeout, $log, $interval, applicationsService, adminsService, microserviceService, widgetsCatalogService, errorMessageByCode, ECOMP_URL_REGEX, $window,userProfileService, confirmBoxService, $cookies,items) {
this.appUpdate = function(){
this.hasSelectedApp = false;
@@ -398,12 +398,46 @@
});
}
};
+ // Caches the file name supplied by the event handler.
+ $scope.widgetFileHandler = (event, files) => {
+ if(files[0]){
+ var fileName = files[0].name;
+ var validFormats = ['zip'];
+ //Get file extension
+ var ext = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase();
+ //Check for valid format
+ if(validFormats.indexOf(ext) == -1){
+ document.getElementById('widget-onboarding-details-upload-file').value = null;
+ $scope.widgetFileTypeError=true;
+ $timeout(function(){
+ $scope.widgetFileTypeError=false;
+ }, 5000);
+ }
+ }
+ }; // file change handler
+
init();
$scope.$on('$stateChangeStart', e => {
e.preventDefault();
});
}
}
- WidgetOnboardingDetailsModalCtrl.$inject = ['$scope', '$log', '$interval', 'applicationsService', 'adminsService', 'microserviceService', 'widgetsCatalogService', 'errorMessageByCode', 'ECOMP_URL_REGEX', '$window','userProfileService', 'confirmBoxService', '$cookies','items'];
+ WidgetOnboardingDetailsModalCtrl.$inject = ['$scope', '$timeout', '$log', '$interval', 'applicationsService', 'adminsService', 'microserviceService', 'widgetsCatalogService', 'errorMessageByCode', 'ECOMP_URL_REGEX', '$window','userProfileService', 'confirmBoxService', '$cookies','items'];
angular.module('ecompApp').controller('WidgetOnboardingDetailsModalCtrl', WidgetOnboardingDetailsModalCtrl);
+
+ angular.module('ecompApp').directive('fileChange', ['$parse', function($parse){
+ return {
+ require: 'ngModel',
+ restrict: 'A',
+ link : function($scope, element, attrs, ngModel) {
+ var attrHandler = $parse(attrs['fileChange']);
+ var handler=function(e) {
+ $scope.$apply(function() {
+ attrHandler($scope, { $event:e, files:e.target.files } );
+ });
+ };
+ element[0].addEventListener('change',handler,false);
+ }
+ }
+ }]);
})();
diff --git a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.modal.html b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.modal.html
index ade07b95..3526ce0c 100644
--- a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.modal.html
+++ b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.modal.html
@@ -150,8 +150,13 @@
<div>
<input id="widget-onboarding-details-upload-file"
file-model="widgetOnboardingDetails.widget.file" type="file"
- class="widget-onboarding-details-upload-file ht" />
-
+ class="widget-onboarding-details-upload-file ht"
+ ng-model="widgetDetails.widgetFile"
+ file-change="widgetFileHandler($event,files)"/>
+ <div class="error-container"
+ ng-show="widgetFileTypeError" class="ng-hide">
+ <div class="err-message">File must be .zip</div>
+ </div>
<div class="error-container"
ng-show="widgetOnboardingDetails.widget.file == undefined && !widgetOnboardingDetails.isEditMode">