You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/06/05 14:14:46 UTC
[incubator-dlab] 04/09: [DLAB-747]: replace notebook validation
with delimitersFiltering CheckUtils
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch feature/projects
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 2ef726774b06302149240eeb21e83da29f972c11
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Wed Jun 5 17:06:14 2019 +0300
[DLAB-747]: replace notebook validation with delimitersFiltering CheckUtils
---
.../src/app/resources/resources-grid/resources-grid.component.ts | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
index 6bf5402..4bb212d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
@@ -28,7 +28,7 @@ import { ResourcesGridRowModel } from './resources-grid.model';
import { FilterConfigurationModel } from './filter-configuration.model';
import { GeneralEnvironmentStatus } from '../../administration/management/management.model';
import { ConfirmationDialogType } from '../../shared';
-import { SortUtil } from '../../core/util';
+import { SortUtil, CheckUtils } from '../../core/util';
import { DetailDialogComponent } from '../exploratory/detail-dialog';
import { AmiCreateDialogComponent } from '../exploratory/ami-create-dialog';
import { InstallLibrariesComponent } from '../exploratory/install-libraries';
@@ -197,7 +197,6 @@ export class ResourcesGridComponent implements OnInit {
}
buildGrid(): void {
-
this.userResourceService.getUserProvisionedResources()
.subscribe((result) => {
this.environments = this.loadEnvironments(result.exploratory, result.shared);
@@ -210,16 +209,12 @@ export class ResourcesGridComponent implements OnInit {
containsNotebook(notebook_name: string): boolean {
if (notebook_name)
for (let index = 0; index < this.environments.length; index++)
- if (this.delimitersFiltering(notebook_name) === this.delimitersFiltering(this.environments[index].name))
+ if (CheckUtils.delimitersFiltering(notebook_name) === CheckUtils.delimitersFiltering(this.environments[index].name))
return true;
return false;
}
- public delimitersFiltering(notebook_name): string {
- return notebook_name.replace(this.delimitersRegex, '').toString().toLowerCase();
- }
-
loadEnvironments(exploratoryList: Array<any>, sharedDataList: any): Array<ResourcesGridRowModel> {
if (exploratoryList && sharedDataList) {
return exploratoryList.map((value) => {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org