You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2020/07/23 16:06:38 UTC
[incubator-dlab] branch DLAB-1750 updated (03fd607 -> 52ca2c6)
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a change to branch DLAB-1750
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.
from 03fd607 [DLAB-1750] Added lib versions from UI
add 6b1ed78 [DLAB-1873] Fixed issue with bucket service config
add b7314d6 Merge remote-tracking branch 'origin/develop' into develop
add 9eab69a [DLAB-54]: added script to terminate custom notebook image
add cd0415e [DLAB-54]: added script to create custom notebook image
add 9e74e03 [DLAB-54]: changed to terminate both primary and secondary images
add a7d8ebb Allowed creation images on gcp from UI
add db5483c Added mock file for dev mode for creating image
add 6212366 [DLAB-54]: changed code to create use and delete custom images
add 9c14667 Merge pull request #786 from apache/DLAB-54-dev
add 6c1871a [DLAB-1858]: Added hint for library in library grid (#787)
add 7f19cd9 [DLAB-1875]: Passed correct endpoint (#789)
add d9d04e4 [DLAB-1674] Take instance statuses into consideration while terminating edge node
add e396ea3 [DLAB-1874]: Fixed set of tasks for 'Environment management' page (#790)
add fc2f9af [DLAB-1876] Fixed bug with creating folders in bucket browser
add 29cb8d7 [DLAB-1881]: Updated folder creation in bucket-browser, Changed refresh token time to 25min (#791)
add 5fdfa71 [DLAB-1877]: Fixed set of tasks on "Environment management" (#792)
add 26cb3ae Fixed endpoint disconnecting issue
add c493306 [DLAB-1882]: made names of images lower case
add 5e18a2f [DLAB-1882]: changed image creation
add 2795ac8 Merge pull request #793 from apache/DLAB-1882
add 315ee25 Merge remote-tracking branch 'origin/develop' into develop
add db10cec Bump DLab version
add 153a0cf [DLAB-1884]: Fixed set of tasks for 'Environment management' page (#794)
add f30a38f [DLAB-1777] Fixed issue with content type for objects while uploading via DLab UI
add b41ded7 Added validation for folder creation
add cdaac51 [DLAB-1890]: Removed repeated request for lib groups
add 4e15862 Increased -Xmx java option
add 16ae6ac Added audit support for projects
add 809fa37 Added audit support for notebooks
add b4291ee Added audit endpoint
add 2c5c0f7 Added endpoint to retrieve audit
add e688b73 Added audit support for projects
add 28ed0cb Added audit support for projects
add 8032353 Merge remote-tracking branch 'origin/audit' into audit
add e6d4e5d [DLAB-1758]: Merge audit UI (#784)
add 66f49da Merge remote-tracking branch 'origin/audit' into audit
add 6560b6c Added audit for computational resources
add 0a423f7 Change endpoint disconnecting settings
add c66d6c4 Added audit for computational resources
add f8b8b37 Merge remote-tracking branch 'origin/audit' into audit
add 7250f2f Audit changes
add a8f4877 Merge with develop
add 8689a88 fixed bug with audit for while updating budget
add 9d94469 Added audit for endpoint
add 840d811 Merge remote-tracking branch 'origin/audit' into audit
add 40e9e5f added 'project' field to audit
add ea69832 Merge remote-tracking branch 'origin/audit' into audit
add da7cdbe Refactoring of project audit
add 5973a0e Code refactoring
add 3a9e635 Changed data type
add de9ea30 Added audit for bucket browser
add 6c533bd Added audit for creating images
add 28302a4 Added audit for managing git accounts
add 3a6e8ec Added audit for user log in action
add 1eeffc2 Added audit for installing libs
add cebfbd4 Added audit for schedulers
add 72844e9 [DLAB-1873] Fixed issue with bucket service config
add fceb546 Added audit for groups
add 1506b6b roles data structure changed
add 72c6c7f Added audit computational while managing notebook/project
add abb6979 Added pagination for audit records
add 92bfdbf Update audit actions, other small fixes
add 13b73bd Merge remote-tracking branch 'origin/audit' into audit
add 4a47ae1 Added custom pagination
add 8d0ffca Added table for audit info dialog
add 815daaa Added pagination and filtering for audit records
add 03714a9 Merge branch 'audit' of github.com:apache/incubator-dlab into audit
add c62d259 Added delimiters for action with group
add 8f6229e Merge branch 'audit' of github.com:apache/incubator-dlab into audit
add 4628520 Added filters for audit
add 4959110 Merge branch 'audit' of github.com:apache/incubator-dlab into audit
add e044d81 Connected UI pagination, filtration with BA
add 32c8727 Fixed bugs, refactored code
add 01dc553 fixed typo
add 4d0e7da Fixed issue with 'List of Resources' page
add f32a31d Changed audit columns positions,
add 84ba176 [DLAB-1888] Divide action one two columns
add c2c59a6 Added resource type filter
add 05d7f50 [DLAB-1889]: Added resource-type column and filter
add cd374d8 added resource-types filter
add 1f51bf7 Merge branch 'audit' into develop
add 167c626 Fixed merge conflicts
add 202e6f2 [DLAB-1734] Conveyed amount of nodes for computational resources
add 28e8774 [develop]: changed dlab-version in jar files
add 158f42e [DLAB-1887]: Made the same behaviour for refresh buttons on all pages (#799)
add f7a70da [DLAB-1893] - MongoDB version updated to 4.2
add 115172b Merge pull request #800 from apache/DLAB-1893
add 25f1808 [DLAB-1894]: Fixed set of UI style tasks (#801)
add 2a57d03 Fix upload file quantity in Bucket browser
add 4cf5db4 [DLAB-1896]: make audit hidden if value of 'auditEnabled' is false (#802)
add 25a0dea [DLAB-1897] Fixed issue with scheduler
add ea91f7d [DLAB-1899] Added folder creation to audit
add a6e65fb [DLAB-1898]: Made possible to delete empty folder via bucket browser and Fixed audit for bucket-browser (#803)
add c747d7c Resolved merge conflicts
add 1aba72b Append stacktrace for billing error
add 0282232 [DLAB-1883]: Disabled access to bucket if endpoint is stopped or terminated (#804)
add bbe8bb5 [DLAB-1910]: Fixed button size of log out action (#805)
add 815548c [DLAB-1907] Support retrieving schedulers for stop for specific duration(now() - minuteOffset)
add fef0019 [DLAB-1914] Fixed issue with number of slaves for data engine service
add a9b1781 [DLAB-1720] Exploratory Billing report fix (#806)
add 67ae0ff [DLAB-1913]: Fixed set of UI tasks for 'Billing report' and 'List of resource' pages (#807)
add 6af8bce [DLAB-1720] Minor fix for exploratory report (#808)
add 6546373 [DLAB-1901] Added support for quota per month
add dffcbb0 [DLAB-1917]: Fixed set of UI tasks in Audit (#809)
add 37bca01 [DLAB-1902]: Support quota per month(UI) (#810)
add 934173e monthly budget fix
add 2111c06 [DLAB-1917]: Fixed set of UI Audit tasks (#811)
add 9d5dbc5 [DLAB-1919]First part of audit changes
add 4ef5ba3 [DLAB-1919] Second part of changes
add 6e39da5 [DLAB-1917]: Fixed follow link action for AUDIT (#812)
add c03a9c1 Added log for opening terminal(UI)
add 9c1384b [DLAB-1924]:Implemented UI changes for scheduler (#814)
add c873985 Merge remote-tracking branch 'origin/develop' into develop
add 70f2594 [DLAB-1925] Change total instance number for EMR, fixed billing on resource (#815)
add 1d9fc97 [DLAB-1921] Fixed creation Group defect (#813)
add ca3f908 [DLAB-1929] Allowed only one active Data Engine Service per notebook (#816)
add 7a9efff [DLAB-1934] Implemented set of UI tasks in Audit(part2) (#818)
add f2cb252 [DLAB-1918] Empty Budget values (#817)
add 1e7757d [DLAB-1934] Fixed audit issues (#819)
add b6436e0 [DLAB-1749] Fixed set of UI tasks in audit(Part3) (#821)
add 6c7a0cf [DLAB-1940]: added check of endpoint name during AMI deregistering
add db3e688 Merge pull request #820 from apache/DLAB-1940
add f0b97c7 [DLAB-1945]: Allowed only one cluster for notebook (#822)
add 7ff249d Compute copy hint fix
add 1759f9e [DLAB-1714] BE created notification in case project quota is exceeded
add 011f939 [DLAB-1748]: added installation of specific debian os pkg and dependencies to response file
add 03f6e24 [DLAB-1748]: added installation of specific pip lib and list of versions and dependencies to response file
add 246b2e6 [DLAB-1748]: added installation of specific pip lib and list of versions and dependencies to response file for other group
add b7afe51 [DLAB-1748]: added installation of specific pip lib and list of versions and dependencies to response file for other group
add d0899c4 [DLAB-1748]: made dependencies a list
add a4895c1 [DLAB-1748]: made dependencies equal 'none' if there are no dependencies for pip
add c2fe8f2 [DLAB-1748]: changed how list of available pip versions is returned
add c7913e1 [DLAB-1748]: made list of available pip versions equal none if there are no available versions
add 31a9b8b [DLAB-1748]: made changes to apt and pip installation
add 23a4cf5 [DLAB-1748]: made changes to apt and pip installation
add 5b4c4e5 [DLAB-1748]: made changes to apt and pip installation status
add d6c6f67 [DLAB-1748]: made pip dependencies a list
add a17e982 [DLAB-1748]: added installaton of specific version for R
add 744d146 [DLAB-1748]: changed how new installed dependencies are acquired for pip
add 7da2448 [DLAB-1748]: changed how new installed dependencies are acquired for pip
add 9ab3b43 [DLAB-1748]: made some changes for r pkg installation
add 27eeda8 [DLAB-1940]: changed debian package and r installation
add d681f82 [DLAB-1749] BE support library installation of particular version
add a9a4c9d Merge branch 'DLAB-1750' into DLAB-1749
add 6412708 small fix
add 18104f0 [DLAB-1750] Added possibility to install lib with different version
add e2e5f74 [DLAB-1750] Added validation for existing and installed libs
add a4ce996 [DLAB-1749] BE support library installation of particular version
add a45f5ac Merge branch 'DLAB-1749' of github.com:apache/incubator-dlab into DLAB-1749
add cdecfd1 [DLAB-1750] Added validation for existing and installed libs
add 6737547 [DLAB-1749] BE support library installation of particular version
add 507cb3d Merge branch 'develop' into DLAB-1749
add 0bad8ba [DLAB-1749] Added available lib version list dialog
add a42782f [DLAB-1749] Updated ordering
add fdd45f1 Merge remote-tracking branch 'origin/DLAB-1749' into DLAB-1749
add c2466db Merge remote-tracking branch 'remotes/origin/DLAB-1749' into DLAB-1748
add f96b95a Merge branch 'DLAB-1748' of https://github.com/apache/incubator-dlab into DLAB-1748
add 2ce666f [DLAB-1748]: added new error status when invalid version
add 0746872 [DLAB-1748]: added new error status when invalid version for R and apt
add f3546d5 [DLAB-1748]: added versions for apt dependencies
add c807071 [DLAB-1748]: added versions for pip dependencies
add ac62c96 [DLAB-1748]: added versions for pip dependencies
add 45e328d [DLAB-1748]: added versions for R dependencies
add 4cf9e1b [DLAB-1750] Added lib igo message for other group, status version invalid
add 43cd662 [DLAB-1947] Implemented additional changes for lib management
add 3b8ac2b Merge branch 'DLAB-1748' of github.com:apache/incubator-dlab into DLAB-1748
add 1e09940 [DLAB-1750] fix status color
add 2295bde [DLAB-1750] small fix
add 84d7c1f [DLAB-1748]: Fixed bug with autocomplete
add 2a7864c Merge branch 'DLAB-1748' of https://github.com/apache/incubator-dlab into DLAB-1748
add 7e35bde [DLAB-1748]: fixed error R in pkg install
add 60ac231 [DLAB-1748]: fix for redhat ssn deployment
add 0001a8f [DLAB-1748]: changed apt and pip dependencies list
add 911966a Merge pull request #824 from apache/DLAB-1748
new 06eac11 Add 2 inputs for lib and version
new 52ca2c6 [DLAB-1943]: Fixed issues for library page
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
build.properties | 2 +-
.../src/general/lib/os/debian/notebook_lib.py | 49 ++-
.../src/general/lib/os/debian/ssn_lib.py | 8 +-
.../src/general/lib/os/fab.py | 97 ++++-
.../src/general/lib/os/redhat/ssn_lib.py | 13 +-
.../src/general/scripts/aws/project_terminate.py | 6 +-
.../src/general/scripts/azure/project_terminate.py | 8 +-
.../scripts/gcp/common_create_notebook_image.py | 92 ++++
.../general/scripts/gcp/common_prepare_notebook.py | 24 +-
.../common_terminate_notebook_image.py | 30 +-
.../src/general/scripts/gcp/project_terminate.py | 2 +-
.../general/scripts/os/install_additional_libs.py | 3 +-
.../src/ssn/templates/supervisor_svc.conf | 4 +-
.../terraform/bin/deploy/endpoint_fab.py | 8 +-
.../terraform/bin/deploy/provisioning.yml | 5 +
.../terraform/bin/deploy/supervisor_svc.conf | 2 +-
services/billing-aws/Dockerfile | 4 +-
services/billing-azure/Dockerfile | 4 +-
services/billing-gcp/Dockerfile | 4 +-
.../computational/AwsComputationalResource.java | 5 +-
.../com/epam/dlab/dto/bucket/FolderUploadDTO.java} | 8 +-
.../SparkStandaloneClusterResource.java | 5 +-
.../computational/UserComputationalResource.java | 4 +-
.../epam/dlab/dto/exploratory/LibInstallDTO.java | 8 +
.../computational/GcpComputationalResource.java | 4 +-
.../ImageType.java => model/StringList.java} | 40 +-
.../java/com/epam/dlab/util/UsernameUtils.java | 2 +-
.../epam/dlab/rest/contracts/ComputationalAPI.java | 1 +
.../dlab/backendapi/resources/BucketResource.java | 13 +-
.../azure/ComputationalResourceAzure.java | 2 +-
.../dlab/backendapi/service/BucketService.java | 5 +-
.../service/impl/aws/BucketServiceAwsImpl.java | 22 +-
.../service/impl/azure/BucketServiceAzureImpl.java | 8 +-
.../service/impl/gcp/BucketServiceGcpImpl.java | 22 +-
.../{aws => gcp}/notebook_create_image.json | 3 +-
services/self-service/Dockerfile | 2 +-
services/self-service/entrypoint.sh | 2 +-
services/self-service/self-service.yml | 4 +-
.../dlab/backendapi/SelfServiceApplication.java | 39 +-
.../annotation/{ProjectAdmin.java => Audit.java} | 8 +-
.../backendapi/annotation/{User.java => Info.java} | 2 +-
.../annotation/{User.java => ResourceName.java} | 2 +-
.../conf/SelfServiceApplicationConfiguration.java | 7 +
.../dao/{UserGroupDao.java => AuditDAO.java} | 15 +-
.../com/epam/dlab/backendapi/dao/AuditDAOImpl.java | 169 +++++++
.../epam/dlab/backendapi/dao/BaseBillingDAO.java | 30 +-
.../java/com/epam/dlab/backendapi/dao/BaseDAO.java | 2 +
.../com/epam/dlab/backendapi/dao/BillingDAO.java | 9 +-
.../epam/dlab/backendapi/dao/ExploratoryDAO.java | 12 +-
.../dlab/backendapi/dao/ExploratoryLibDAO.java | 38 +-
.../com/epam/dlab/backendapi/dao/ProjectDAO.java | 2 +-
.../epam/dlab/backendapi/dao/ProjectDAOImpl.java | 15 +-
.../com/epam/dlab/backendapi/dao/UserGroupDao.java | 1 +
.../epam/dlab/backendapi/dao/UserGroupDaoImpl.java | 28 +-
...ConfigurationData.java => AuditActionEnum.java} | 11 +-
.../AuditCreateDTO.java} | 14 +-
.../com/epam/dlab/backendapi/domain/AuditDTO.java} | 17 +-
...{BillingReport.java => AuditPaginationDTO.java} | 28 +-
...urationData.java => AuditResourceTypeEnum.java} | 11 +-
.../epam/dlab/backendapi/domain/BudgetDTO.java} | 16 +-
.../dlab/backendapi/domain/CreateProjectDTO.java | 3 +-
.../backendapi/domain/ExploratoryLibCache.java | 21 +-
.../epam/dlab/backendapi/domain/ProjectDTO.java | 2 +-
.../backendapi/domain/UpdateProjectBudgetDTO.java | 1 +
.../backendapi/interceptor/AuditInterceptor.java | 127 ++++++
.../interceptor/BudgetLimitInterceptor.java | 5 +-
.../backendapi/modules/CloudProviderModule.java | 11 +-
.../epam/dlab/backendapi/modules/DevModule.java | 6 +
.../dlab/backendapi/modules/ProductionModule.java | 6 +
.../dlab/backendapi/resources/AuditResource.java | 70 +++
.../dlab/backendapi/resources/BillingResource.java | 8 +
.../dlab/backendapi/resources/BucketResource.java | 29 +-
.../backendapi/resources/EndpointResource.java | 16 +-
.../backendapi/resources/ExploratoryResource.java | 8 +-
.../backendapi/resources/GitCredsResource.java | 41 +-
.../resources/ImageExploratoryResource.java | 7 +-
.../backendapi/resources/KeycloakResource.java | 27 +-
.../resources/LibExploratoryResource.java | 26 +-
.../dlab/backendapi/resources/ProjectResource.java | 21 +-
.../backendapi/resources/SchedulerJobResource.java | 7 +-
.../backendapi/resources/UserGroupResource.java | 9 +-
.../resources/aws/ComputationalResourceAws.java | 68 +--
.../azure/ComputationalResourceAzure.java | 73 ++--
...BucketDownloadDTO.java => FolderUploadDTO.java} | 4 +-
.../dlab/backendapi/resources/dto/GroupDTO.java | 3 +-
.../resources/dto/HealthStatusPageDTO.java | 6 +-
.../backendapi/resources/dto/LibraryStatus.java | 6 +
.../resources/dto/ProjectInfrastructureInfo.java | 4 +-
.../dto/{LibraryDTO.java => QuotaUsageDTO.java} | 18 +-
.../dto/{GroupDTO.java => UpdateGroupDTO.java} | 14 +-
.../resources/gcp/ComputationalResourceGcp.java | 104 ++---
.../schedulers/CheckProjectQuoteScheduler.java | 6 +-
.../{BackupService.java => AuditService.java} | 17 +-
.../dlab/backendapi/service/BillingService.java | 15 +-
.../dlab/backendapi/service/BucketService.java | 8 +-
.../backendapi/service/ComputationalService.java | 59 +--
.../dlab/backendapi/service/EndpointService.java | 6 +-
.../backendapi/service/ExploratoryService.java | 10 +-
.../service/ImageExploratoryService.java | 2 +-
.../dlab/backendapi/service/LibraryService.java | 4 +-
.../dlab/backendapi/service/ProjectService.java | 25 +-
.../backendapi/service/SchedulerJobService.java | 5 +-
.../backendapi/service/SecurityServiceImpl.java | 15 +-
.../dlab/backendapi/service/UserGroupService.java | 9 +-
.../backendapi/service/impl/AuditServiceImpl.java | 63 +++
.../service/impl/BillingServiceImpl.java | 57 ++-
.../backendapi/service/impl/BucketServiceImpl.java | 46 +-
.../service/impl/ComputationalServiceImpl.java | 148 ++++---
.../service/impl/EndpointServiceImpl.java | 83 ++--
.../service/impl/EnvironmentServiceImpl.java | 44 +-
.../service/impl/ExploratoryServiceImpl.java | 178 +++++---
.../service/impl/GitCredentialServiceImpl.java | 71 +--
.../service/impl/ImageExploratoryServiceImpl.java | 88 ++--
.../impl/InfrastructureInfoServiceImpl.java | 37 +-
.../service/impl/LibraryServiceImpl.java | 81 ++--
.../service/impl/ProjectServiceImpl.java | 204 ++++++---
.../service/impl/SchedulerJobServiceImpl.java | 231 +++++-----
.../service/impl/UserGroupServiceImpl.java | 122 +++++-
.../epam/dlab/backendapi/util/BillingUtils.java | 4 +-
.../epam/dlab/backendapi/util/RequestBuilder.java | 154 +++----
.../management/endpoints/endpoints.component.ts | 9 +-
.../manage-environment-dilog.component.html | 38 +-
.../manage-environment-dilog.component.scss | 8 +-
.../manage-environment-dilog.component.ts | 11 +-
.../management-grid/management-grid.component.html | 58 ++-
.../management-grid/management-grid.component.scss | 21 +-
.../management-grid/management-grid.component.ts | 38 +-
.../management/management.component.html | 2 +-
.../management/management.component.ts | 17 +-
.../administration/management/management.model.ts | 1 +
.../administration/project/project-data.service.ts | 13 +-
.../project-list/project-list.component.html | 6 +-
.../project-list/project-list.component.scss | 6 +-
.../app/administration/roles/roles.component.ts | 36 +-
.../resources/webapp/src/app/core/core.module.ts | 2 +
.../convert-action.pipe.ts} | 8 +-
.../index.ts | 8 +-
.../resources/webapp/src/app/core/pipes/index.ts | 1 +
.../app/core/pipes/lib-sort-pipe/lib-sort.pipe.ts | 6 +-
.../services/applicationServiceFacade.service.ts | 22 +
.../services/{admin.guard.ts => audit.guard.ts} | 4 +-
.../webapp/src/app/core/services/audit.service.ts | 47 ++
.../app/core/services/bucket-browser.service.ts | 8 +
.../src/app/core/services/healthStatus.service.ts | 4 +
.../webapp/src/app/core/services/index.ts | 1 +
.../audit/audit-grid/audit-grid.component.html | 232 ++++++++++
.../audit/audit-grid/audit-grid.component.scss | 291 +++++++++++++
.../audit/audit-grid/audit-grid.component.ts | 308 +++++++++++++
.../audit-toolbar/audit-toolbar.component.html} | 11 +-
.../audit-toolbar/audit-toolbar.component.scss} | 2 +-
.../audit-toolbar/audit-toolbar.component.ts} | 44 +-
.../src/app/reports/audit/audit.component.ts | 101 +++++
.../audit/audit.module.ts} | 27 +-
.../src/app/reports/audit/filter-audit.model.ts | 27 ++
.../reporting-grid/reporting-grid.component.html | 4 +-
.../reporting-grid/reporting-grid.component.scss | 0
.../reporting-grid/reporting-grid.component.ts | 9 +-
.../{ => reports}/reporting/reporting.component.ts | 31 +-
.../{ => reports}/reporting/reporting.module.ts | 6 +-
.../reporting/toolbar/toolbar.component.html | 4 +-
.../reporting/toolbar/toolbar.component.scss | 0
.../reporting/toolbar/toolbar.component.ts | 6 +-
.../index.ts => reports/reports.module.ts} | 13 +-
.../bucket-browser/bucket-browser.component.html | 12 +-
.../bucket-browser/bucket-browser.component.ts | 35 +-
.../bucket-browser/bucket-data.service.ts | 4 +-
.../folder-tree/folder-tree.component.html | 2 +-
.../folder-tree/folder-tree.component.ts | 39 +-
.../cluster-details/cluster-details.component.html | 31 +-
.../cluster-details/cluster-details.component.scss | 11 +
.../cluster-details/cluster-details.component.ts | 32 +-
...utational-resource-create-dialog.component.html | 6 +-
...mputational-resource-create-dialog.component.ts | 2 +-
.../computational-resources-list.component.scss | 10 +-
.../detail-dialog/detail-dialog.component.html | 30 +-
.../detail-dialog/detail-dialog.component.scss | 6 +
.../detail-dialog/detail-dialog.component.ts | 20 +-
.../exploratory/install-libraries/index.ts | 6 +-
.../install-libraries.component.html | 240 +++++++---
.../install-libraries.component.scss | 86 +++-
.../install-libraries.component.ts | 210 +++++----
.../install-libraries/install-libraries.model.ts | 2 +-
.../resources-grid/resources-grid.component.html | 66 ++-
.../resources-grid/resources-grid.component.scss | 27 +-
.../resources-grid/resources-grid.component.ts | 108 +++--
.../resources-grid/resources-grid.model.ts | 6 +-
.../resources/scheduler/scheduler.component.html | 13 +-
.../app/resources/scheduler/scheduler.component.ts | 9 +-
.../dropdown-list/dropdown-list.component.html | 4 +-
.../dropdown-list/dropdown-list.component.ts | 5 +
.../webapp/src/app/shared/form-controls/index.ts | 17 +-
.../multi-select-dropdown.component.html | 13 +-
.../notification-dialog.component.ts | 27 +-
.../webapp/src/app/shared/navbar/index.ts | 2 +-
.../src/app/shared/navbar/navbar.component.html | 16 +-
.../src/app/shared/navbar/navbar.component.scss | 8 +-
.../src/app/shared/navbar/navbar.component.ts | 2 +-
.../webapp/src/assets/styles/_dialogs.scss | 8 +-
.../resources/webapp/src/assets/styles/_theme.scss | 3 +
.../webapp/src/assets/styles/_variables.scss | 1 +
.../src/main/resources/webapp/src/styles.scss | 12 +-
.../resources/ExploratoryResourceTest.java | 229 +++++-----
.../resources/ImageExploratoryResourceTest.java | 14 +-
.../resources/LibExploratoryResourceTest.java | 46 +-
.../resources/SchedulerJobResourceTest.java | 25 +-
.../resources/UserGroupResourceTest.java | 45 +-
.../service/impl/ComputationalServiceImplTest.java | 75 ++--
.../service/impl/EnvironmentServiceImplTest.java | 110 ++---
.../service/impl/ExploratoryServiceImplTest.java | 164 +++----
.../impl/ImageExploratoryServiceImplTest.java | 10 +-
.../service/impl/LibraryServiceImplTest.java | 19 +-
.../service/impl/SchedulerJobServiceImplTest.java | 485 +++++++++++----------
.../service/impl/UserGroupServiceImplTest.java | 14 +-
213 files changed, 5100 insertions(+), 2302 deletions(-)
create mode 100644 infrastructure-provisioning/src/general/scripts/gcp/common_create_notebook_image.py
copy infrastructure-provisioning/src/general/scripts/{azure => gcp}/common_terminate_notebook_image.py (53%)
copy services/{self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/BucketDownloadDTO.java => dlab-model/src/main/java/com/epam/dlab/dto/bucket/FolderUploadDTO.java} (85%)
copy services/dlab-model/src/main/java/com/epam/dlab/{dto/imagemetadata/ImageType.java => model/StringList.java} (60%)
copy services/provisioning-service/src/main/resources/mock_response/{aws => gcp}/notebook_create_image.json (90%)
copy services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/{ProjectAdmin.java => Audit.java} (83%)
copy services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/{User.java => Info.java} (97%)
copy services/self-service/src/main/java/com/epam/dlab/backendapi/annotation/{User.java => ResourceName.java} (97%)
copy services/self-service/src/main/java/com/epam/dlab/backendapi/dao/{UserGroupDao.java => AuditDAO.java} (68%)
create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/dao/AuditDAOImpl.java
copy services/self-service/src/main/java/com/epam/dlab/backendapi/domain/{SchedulerConfigurationData.java => AuditActionEnum.java} (82%)
copy services/self-service/src/main/java/com/epam/dlab/backendapi/{resources/dto/BucketDownloadDTO.java => domain/AuditCreateDTO.java} (79%)
copy services/{dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDTO.java => self-service/src/main/java/com/epam/dlab/backendapi/domain/AuditDTO.java} (74%)
copy services/self-service/src/main/java/com/epam/dlab/backendapi/domain/{BillingReport.java => AuditPaginationDTO.java} (66%)
copy services/self-service/src/main/java/com/epam/dlab/backendapi/domain/{SchedulerConfigurationData.java => AuditResourceTypeEnum.java} (82%)
copy services/{dlab-model/src/main/java/com/epam/dlab/dto/bucket/BucketDTO.java => self-service/src/main/java/com/epam/dlab/backendapi/domain/BudgetDTO.java} (80%)
create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/interceptor/AuditInterceptor.java
create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/resources/AuditResource.java
copy services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/{BucketDownloadDTO.java => FolderUploadDTO.java} (95%)
copy services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/{LibraryDTO.java => QuotaUsageDTO.java} (80%)
copy services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/{GroupDTO.java => UpdateGroupDTO.java} (83%)
copy services/self-service/src/main/java/com/epam/dlab/backendapi/service/{BackupService.java => AuditService.java} (64%)
create mode 100644 services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/AuditServiceImpl.java
copy services/self-service/src/main/resources/webapp/src/app/core/pipes/{underscoreless-pipe/underscoreless.pipe.ts => convert-action-pipe/convert-action.pipe.ts} (81%)
copy services/self-service/src/main/resources/webapp/src/app/core/pipes/{replace-breaks-pipe => convert-action-pipe}/index.ts (85%)
copy services/self-service/src/main/resources/webapp/src/app/core/services/{admin.guard.ts => audit.guard.ts} (91%)
create mode 100644 services/self-service/src/main/resources/webapp/src/app/core/services/audit.service.ts
create mode 100644 services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.html
create mode 100644 services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.scss
create mode 100644 services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
copy services/self-service/src/main/resources/webapp/src/app/{reporting/toolbar/toolbar.component.html => reports/audit/audit-toolbar/audit-toolbar.component.html} (80%)
copy services/self-service/src/main/resources/webapp/src/app/{reporting/toolbar/toolbar.component.scss => reports/audit/audit-toolbar/audit-toolbar.component.scss} (99%)
copy services/self-service/src/main/resources/webapp/src/app/{reporting/toolbar/toolbar.component.ts => reports/audit/audit-toolbar/audit-toolbar.component.ts} (74%)
create mode 100644 services/self-service/src/main/resources/webapp/src/app/reports/audit/audit.component.ts
copy services/self-service/src/main/resources/webapp/src/app/{reporting/reporting.module.ts => reports/audit/audit.module.ts} (64%)
create mode 100644 services/self-service/src/main/resources/webapp/src/app/reports/audit/filter-audit.model.ts
rename services/self-service/src/main/resources/webapp/src/app/{ => reports}/reporting/reporting-grid/reporting-grid.component.html (98%)
rename services/self-service/src/main/resources/webapp/src/app/{ => reports}/reporting/reporting-grid/reporting-grid.component.scss (100%)
rename services/self-service/src/main/resources/webapp/src/app/{ => reports}/reporting/reporting-grid/reporting-grid.component.ts (91%)
rename services/self-service/src/main/resources/webapp/src/app/{ => reports}/reporting/reporting.component.ts (89%)
rename services/self-service/src/main/resources/webapp/src/app/{ => reports}/reporting/reporting.module.ts (88%)
rename services/self-service/src/main/resources/webapp/src/app/{ => reports}/reporting/toolbar/toolbar.component.html (96%)
rename services/self-service/src/main/resources/webapp/src/app/{ => reports}/reporting/toolbar/toolbar.component.scss (100%)
rename services/self-service/src/main/resources/webapp/src/app/{ => reports}/reporting/toolbar/toolbar.component.ts (94%)
copy services/self-service/src/main/resources/webapp/src/app/{core/pipes/lib-sort-pipe/index.ts => reports/reports.module.ts} (77%)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org
[incubator-dlab] 01/02: Add 2 inputs for lib and version
Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DLAB-1750
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 06eac11383e4a05604f43d7ba1fc5417083bb611
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Wed Jul 22 10:16:40 2020 +0300
Add 2 inputs for lib and version
---
.../install-libraries.component.html | 140 ++++++++++++++-------
.../install-libraries.component.scss | 24 +++-
.../install-libraries.component.ts | 13 +-
3 files changed, 121 insertions(+), 56 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
index 5d53b59..2146f5d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
@@ -52,61 +52,105 @@
</div>
</div>
</div>
+ <div class="m-top-20">
+ <div class="control-group constol-select">
+ <label class="label">Library name</label>
+ <div class="control">
+ <input type="text" [placeholder]="'Enter library name'" [(ngModel)]="lib.name" [disabled]="!group" matInputb>
+ </div>
+ </div>
+ <div class="control-group control-select">
+ <label class="label">Library version</label>
+ <div class="control">
+ <input type="text" [placeholder]="'Enter library version (optional)'" [(ngModel)]="lib.version" [disabled]="!lib.name" [matAutocomplete]="auto" #trigger="matAutocompleteTrigger" [formControl]="libSearch">
+ <mat-autocomplete #auto="matAutocomplete" class="suggestions" >-->
+ <ng-template ngFor let-item [ngForOf]="filteredList" let-i="index" *ngIf="query.indexOf(':') === -1">
+ <mat-option [ngClass]="{ 'not-allowed': isDuplicated(item) }">
+ <div class="option" (click)="selectLibrary(item)">
+ <a *ngIf="!isDuplicated(item)">
+ <span [innerHTML]="item.name | highlight:query"></span>
+ <!-- <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>-->
+ </a>
+ <span *ngIf="isInSelectedList || isInstalled">{{ item.name }}
+ <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>
+ </span>
+
+ <strong *ngIf="isInSelectedList">selected
+ <i class="material-icons">done</i>
+ </strong>
+ <strong *ngIf="isInstalled">installed
+ <i class="material-icons">done</i>
+ </strong>
+ </div>
+ </mat-option>
+ </ng-template>
+<!-- <mat-option *ngIf="model.isEmpty(filteredList) && !validity_format && query.indexOf(':') === -1">-->
+<!-- <span class="configuring">No matches found</span>-->
+<!-- </mat-option>-->
+<!-- <mat-option *ngIf="validity_format?.length > 0">-->
+<!-- <span class="configuring" *ngIf="query.indexOf(':') === -1">{{ validity_format }}</span >-->
+<!-- </mat-option>-->
+ </mat-autocomplete>
+ <span class="error-message" *ngIf="!group && libSearch.value">Group field is required. Please choose appropriate group.</span>
+ </div>
+ </div>
+ <mat-icon class="plus-icon" (click)="addLibrary(lib)" [ngClass]="{'not-allow': !lib.name}">add</mat-icon>
+ </div>
<p class="other-message">
<span *ngIf="group === 'others'">Other group can include libs from Python 2 and Python 3 groups</span>
</p>
<div class="search">
- <mat-form-field class="chip-list">
- <input
- type="text"
- [placeholder]="group === 'java' ?
- 'Enter library name in <groupId>:<artifactId>:<versionId> format' :
- 'Enter library name in <name>:<version> format(version is not required)'"
- matInput
- #trigger="matAutocompleteTrigger"
- [formControl]="libSearch"
- [value]="query"
- [matAutocomplete]="auto"
- >
-<!-- <span class="add-icon" [matTooltip]="(isInSelectedList || isInstalled) ? 'Current library dosen\'t exist' : 'You have already added or installed current library'"-->
-<!-- matTooltipPosition="above"-->
-<!-- [matTooltipDisabled] = "isLibExist && (isInSelectedList || isInstalled)"-->
- <span class="add-icon">
- <button mat-icon-button class="btn" [disabled]="!isLibExist || query.length < 1 ||
- isDuplicated({name: query.slice(0, query.indexOf(':')), version: query.slice(query.indexOf(':') + 1) || 'N/A'})" (click)="addLibrary(query);$event.stopPropagation()">
- <mat-icon matSuffix >add</mat-icon>
- </button>
- </span>
+<!-- <mat-form-field class="chip-list">-->
+<!-- <input-->
+<!-- type="text"-->
+<!-- [placeholder]="group === 'java' ?-->
+<!-- 'Enter library name in <groupId>:<artifactId>:<versionId> format' :-->
+<!-- 'Enter library name in <name>:<version> format(version is not required)'"-->
+<!-- matInput-->
+<!-- #trigger="matAutocompleteTrigger"-->
+<!-- [formControl]="libSearch"-->
+<!-- [value]="query"-->
+<!-- [matAutocomplete]="auto"-->
+<!-- >-->
+<!--<!– <span class="add-icon" [matTooltip]="(isInSelectedList || isInstalled) ? 'Current library dosen\'t exist' : 'You have already added or installed current library'"–>-->
+<!--<!– matTooltipPosition="above"–>-->
+<!--<!– [matTooltipDisabled] = "isLibExist && (isInSelectedList || isInstalled)"–>-->
+<!-- <span class="add-icon">-->
+<!-- <button mat-icon-button class="btn" [disabled]="!isLibExist || query.length < 1 ||-->
+<!-- isDuplicated({name: query.slice(0, query.indexOf(':')), version: query.slice(query.indexOf(':') + 1) || 'N/A'})" (click)="addLibrary(query);$event.stopPropagation()">-->
+<!-- <mat-icon matSuffix >add</mat-icon>-->
+<!-- </button>-->
+<!-- </span>-->
- <mat-autocomplete #auto="matAutocomplete" class="suggestions" >
- <ng-template ngFor let-item [ngForOf]="filteredList" let-i="index" *ngIf="query.indexOf(':') === -1">
- <mat-option [ngClass]="{ 'not-allowed': isDuplicated(item) }">
- <div class="option" (click)="selectLibrary(item)">
- <a *ngIf="!isDuplicated(item)">
- <span [innerHTML]="item.name | highlight:query"></span>
+<!-- <mat-autocomplete #auto="matAutocomplete" class="suggestions" >-->
+<!-- <ng-template ngFor let-item [ngForOf]="filteredList" let-i="index" *ngIf="query.indexOf(':') === -1">-->
+<!-- <mat-option [ngClass]="{ 'not-allowed': isDuplicated(item) }">-->
+<!-- <div class="option" (click)="selectLibrary(item)">-->
+<!-- <a *ngIf="!isDuplicated(item)">-->
+<!-- <span [innerHTML]="item.name | highlight:query"></span>-->
+<!--<!– <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>–>-->
+<!-- </a>-->
+<!-- <span *ngIf="isInSelectedList || isInstalled">{{ item.name }}-->
<!-- <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>-->
- </a>
- <span *ngIf="isInSelectedList || isInstalled">{{ item.name }}
- <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>
- </span>
+<!-- </span>-->
- <strong *ngIf="isInSelectedList">selected
- <i class="material-icons">done</i>
- </strong>
- <strong *ngIf="isInstalled">installed
- <i class="material-icons">done</i>
- </strong>
- </div>
- </mat-option>
- </ng-template>
- <mat-option *ngIf="model.isEmpty(filteredList) && !validity_format && query.indexOf(':') === -1">
- <span class="configuring">No matches found</span>
- </mat-option>
- <mat-option *ngIf="validity_format?.length > 0">
- <span class="configuring" *ngIf="query.indexOf(':') === -1">{{ validity_format }}</span >
- </mat-option>
- </mat-autocomplete>
- </mat-form-field>
+<!-- <strong *ngIf="isInSelectedList">selected-->
+<!-- <i class="material-icons">done</i>-->
+<!-- </strong>-->
+<!-- <strong *ngIf="isInstalled">installed-->
+<!-- <i class="material-icons">done</i>-->
+<!-- </strong>-->
+<!-- </div>-->
+<!-- </mat-option>-->
+<!-- </ng-template>-->
+<!-- <mat-option *ngIf="model.isEmpty(filteredList) && !validity_format && query.indexOf(':') === -1">-->
+<!-- <span class="configuring">No matches found</span>-->
+<!-- </mat-option>-->
+<!-- <mat-option *ngIf="validity_format?.length > 0">-->
+<!-- <span class="configuring" *ngIf="query.indexOf(':') === -1">{{ validity_format }}</span >-->
+<!-- </mat-option>-->
+<!-- </mat-autocomplete>-->
+<!-- </mat-form-field> -->
<div class="list-selected list-container" id='scrolling'>
<mat-chip-list *ngIf="model.selectedLibs.length && libs_uploaded">
<mat-chip *ngFor="let item of model.selectedLibs">
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
index fd769f0..044ff8f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
@@ -214,9 +214,13 @@ ul.resources{
width: 100%;
overflow-y: auto;
- .mat-form-field {
+
+ &.mat-form-field {
width: 100%;
- padding: 5px 20px;
+ //padding: 5px 20px;
+ .mat-form-field-infix{
+ display: flex;
+ }
}
.mat-input-flex {
@@ -547,6 +551,22 @@ mat-chip.mat-chip:not(.mat-basic-chip) {
.btn{
line-height: 26px;
}
+
+.m-top-20{
+ position: relative;
+ .plus-icon{
+ position: absolute;
+ right: 70px;
+ top: 5px;
+ color: #35afd5;
+ font-size: 27px;
+ cursor: pointer;
+ &.not-allow{
+ color: lightgray;
+ }
+ }
+}
+
@media screen and (min-width: 1281px) {
.libs-info {
height: 60%;
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
index 2f22fb9..ed5fa6d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
@@ -84,6 +84,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
@ViewChild('trigger', { static: false }) matAutoComplete;
public isLibInfoOpened = { };
private isLibExist: boolean;
+ lib: Library = {name: '', version: ''};
constructor(
@Inject(MAT_DIALOG_DATA) public data: any,
@@ -145,7 +146,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
public filterList(): void {
this.validity_format = '';
- (this.query.length >= 2 && this.group) ? this.getFilteredList() : this.filteredList = null;
+ (this.lib.name.length >= 2 && this.group) ? this.getFilteredList() : this.filteredList = null;
}
public filterGroups(groupsList) {
@@ -192,17 +193,17 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
}
public addLibrary(item): void {
- const lib = item.split(':').filter(v => !!v);
- this.model.selectedLibs.push({ group: this.group, name: lib[0], version: lib[1] || 'N/A' });
+ this.model.selectedLibs.push({ group: this.group, name: item.name, version: item.version || 'N/A' });
this.query = '';
this.libSearch.setValue('');
+ this.lib = {name: '', version: ''};
this.filteredList = null;
}
public selectLibrary(item): void {
// this.model.selectedLibs.push({ group: this.group, name: item.name, version: item.version });
// this.query = '';
- this.libSearch.setValue(item.name + ':');
+ this.libSearch.setValue(item.name);
this.filteredList = null;
}
@@ -417,7 +418,7 @@ export class ErrorLibMessageDialogComponent {
template: `
<div class="dialog-header">
<h4 class="modal-title" *ngIf="data.type === 'added'">Installed dependency</h4>
- <h4 class="modal-title" *ngIf="data.type === 'available'">Library installation error</h4>
+ <h4 class="modal-title" *ngIf="data.type === 'available'">Version is not available</h4>
<button type="button" class="close" (click)="dialogRef.close()">×</button>
</div>
<!-- <mat-list class="resources">-->
@@ -443,7 +444,7 @@ export class ErrorLibMessageDialogComponent {
<span class="strong">Dependency: </span>{{data.lib.add_pkgs.join(', ')}}
</div>
<div class="lib-list" *ngIf="data.type === 'available'">
- <p class="terminated">Version is not available</p>
+<!-- <p class="terminated">Version is not available</p>-->
<span class="strong">Available versions: </span>{{data.lib.available_versions.join(', ')}}
</div>
<!-- <div class="text-center">-->
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org
[incubator-dlab] 02/02: [DLAB-1943]: Fixed issues for library page
Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DLAB-1750
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 52ca2c6f0e2bb8bc1641e131c54aa85e1ff98d39
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Thu Jul 23 19:06:03 2020 +0300
[DLAB-1943]: Fixed issues for library page
---
.../install-libraries.component.html | 156 +++++++++++++++------
.../install-libraries.component.scss | 65 +++++----
.../install-libraries.component.ts | 153 ++++++++++----------
.../src/main/resources/webapp/src/styles.scss | 3 +-
4 files changed, 233 insertions(+), 144 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
index 2146f5d..96f2bd6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
@@ -52,53 +52,119 @@
</div>
</div>
</div>
- <div class="m-top-20">
+ <div class="m-top-20" *ngIf="group !== 'java'; else javaGroup">
<div class="control-group constol-select">
<label class="label">Library name</label>
- <div class="control">
- <input type="text" [placeholder]="'Enter library name'" [(ngModel)]="lib.name" [disabled]="!group" matInputb>
+ <div class="control control-relative">
+ <span class="other-message" *ngIf="group === 'others'">Other group can include libs from Python 2 and Python 3 groups</span>
+ <input
+ type="text" [placeholder]="'Enter library name'"
+ [(ngModel)]="lib.name"
+ [disabled]="!group"
+ [matAutocomplete]="auto"
+ [formControl]="libSearch"
+ #trigger="matAutocompleteTrigger"
+ (keyup.enter)="addLibrary(lib)"
+ >
</div>
+ <mat-autocomplete #auto="matAutocomplete" class="suggestions" >
+ <ng-template ngFor let-item [ngForOf]="filteredList" let-i="index" *ngIf="!selectedLib">
+ <mat-option >
+ <div class="option" (click)="selectLibrary(item);$event.stopPropagation()" [ngClass]="{'not-allow': item.isInSelectedList}">
+ <a *ngIf="!item.isInSelectedList">
+ <span [innerHTML]="item.name | highlight:query"></span>
+ </a>
+ <span *ngIf="item.isInSelectedList">{{ item.name }}
+ <span *ngIf="item.version && item.version !== 'N/A' && item.isInstalled && !item.isInSelectedList">{{ item.version }}</span>
+ </span>
+ <strong *ngIf="item.isInSelectedList">selected
+ <i class="material-icons">done</i>
+ </strong>
+ <strong *ngIf="item.isInstalled && !item.isInSelectedList">installed
+ <i class="material-icons">done</i>
+ </strong>
+ </div>
+ </mat-option>
+ </ng-template>
+ <mat-option *ngIf="model.isEmpty(filteredList) && !validity_format">
+ <span class="configuring">No matches found</span>
+ </mat-option>
+ <mat-option *ngIf="validity_format?.length > 0">
+ <span class="configuring" >{{ validity_format }}</span >
+ </mat-option>
+ </mat-autocomplete>
</div>
<div class="control-group control-select">
<label class="label">Library version</label>
- <div class="control">
- <input type="text" [placeholder]="'Enter library version (optional)'" [(ngModel)]="lib.version" [disabled]="!lib.name" [matAutocomplete]="auto" #trigger="matAutocompleteTrigger" [formControl]="libSearch">
- <mat-autocomplete #auto="matAutocomplete" class="suggestions" >-->
- <ng-template ngFor let-item [ngForOf]="filteredList" let-i="index" *ngIf="query.indexOf(':') === -1">
- <mat-option [ngClass]="{ 'not-allowed': isDuplicated(item) }">
- <div class="option" (click)="selectLibrary(item)">
- <a *ngIf="!isDuplicated(item)">
- <span [innerHTML]="item.name | highlight:query"></span>
- <!-- <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>-->
- </a>
- <span *ngIf="isInSelectedList || isInstalled">{{ item.name }}
- <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>
- </span>
-
- <strong *ngIf="isInSelectedList">selected
- <i class="material-icons">done</i>
- </strong>
- <strong *ngIf="isInstalled">installed
- <i class="material-icons">done</i>
- </strong>
- </div>
- </mat-option>
- </ng-template>
-<!-- <mat-option *ngIf="model.isEmpty(filteredList) && !validity_format && query.indexOf(':') === -1">-->
-<!-- <span class="configuring">No matches found</span>-->
-<!-- </mat-option>-->
-<!-- <mat-option *ngIf="validity_format?.length > 0">-->
-<!-- <span class="configuring" *ngIf="query.indexOf(':') === -1">{{ validity_format }}</span >-->
-<!-- </mat-option>-->
- </mat-autocomplete>
- <span class="error-message" *ngIf="!group && libSearch.value">Group field is required. Please choose appropriate group.</span>
+ <div class="control control-relative">
+ <input type="text" [placeholder]="'Enter library version (optional)'" [(ngModel)]="lib.version" [disabled]="!lib.name" (keyup.enter)="addLibrary(lib)">
+ <span class="plus-icon"
+ [ngClass]="{'not-allow': !this.selectedLib || this.selectedLib?.isInSelectedList}"
+ matTooltip="Library is in selected list" matTooltipPosition="above" [matTooltipDisabled]="!this.selectedLib?.isInSelectedList"
+ >
+ <mat-icon (click)="addLibrary(lib)" [ngClass]="{'not-allowed': !this.selectedLib || this.selectedLib?.isInSelectedList }">add</mat-icon>
+ </span>
</div>
</div>
- <mat-icon class="plus-icon" (click)="addLibrary(lib)" [ngClass]="{'not-allow': !lib.name}">add</mat-icon>
</div>
- <p class="other-message">
- <span *ngIf="group === 'others'">Other group can include libs from Python 2 and Python 3 groups</span>
- </p>
+
+ <ng-template #javaGroup>
+ <div class="m-top-20">
+ <div class="control-group constol-select java-library-search">
+ <label class="label">Library</label>
+ <div class="control control-relative">
+ <span class="other-message" *ngIf="lib.name.length && !this.selectedLib">groupId:artifactId:versionId</span>
+ <input
+ type="text" [placeholder]="'Enter library name in <groupId>:<artifactId>:<versionId> format'"
+ [(ngModel)]="lib.name"
+ [disabled]="!group"
+ [matAutocomplete]="auto"
+ [formControl]="libSearch"
+ #trigger="matAutocompleteTrigger"
+ (keyup.enter)="addLibrary(lib)"
+ >
+ <span
+ class="plus-icon"
+ [ngClass]="{'not-allow': !this.selectedLib || this.selectedLib?.isInSelectedList}"
+ matTooltip="Library is in selected list" matTooltipPosition="above" [matTooltipDisabled]="!this.selectedLib?.isInSelectedList"
+ >
+ <mat-icon (click)="addLibrary(lib)" (keyup.enter)="addLibrary(lib)" [ngClass]="{'not-allowed': !this.selectedLib || this.selectedLib?.isInSelectedList}">add</mat-icon>
+ </span>
+ </div>
+ <mat-autocomplete #auto="matAutocomplete" class="suggestions">
+ <ng-template ngFor let-item [ngForOf]="filteredList" let-i="index" *ngIf="!selectedLib">
+ <mat-option >
+ <div class="option" (click)="selectLibrary(item);$event.stopPropagation()" [ngClass]="{'not-allow': item.isInSelectedList}">
+ <a *ngIf="!item.isInSelectedList">
+ <span [innerHTML]="item.name + ':' + item.version | highlight:query">
+ <span>{{ item.version }}</span>
+ </span>
+ </a>
+ <span *ngIf="item.isInSelectedList">{{ item.name }}
+ <span *ngIf="item.version && item.version !== 'N/A'">{{ item.version }}</span>
+ </span>
+ <strong *ngIf="item.isInSelectedList">selected
+ <i class="material-icons">done</i>
+ </strong>
+ <strong *ngIf="item.isInstalled && !item.isInSelectedList">installed
+ <i class="material-icons">done</i>
+ </strong>
+ </div>
+ </mat-option>
+ </ng-template>
+ <mat-option *ngIf="model.isEmpty(filteredList) && !validity_format">
+ <span class="configuring">No matches found</span>
+ </mat-option>
+ <mat-option *ngIf="validity_format?.length > 0">
+ <span class="configuring" >{{ validity_format }}</span >
+ </mat-option>
+ </mat-autocomplete>
+ </div>
+ </div>
+ </ng-template>
+<!-- <p class="other-message">-->
+<!-- -->
+<!-- </p>-->
<div class="search">
<!-- <mat-form-field class="chip-list">-->
<!-- <input-->
@@ -266,9 +332,11 @@
<!-- </div>-->
<ng-container *ngFor="let lib of filtredNotebookLibs">
<mat-list-item class="table-item">
- <div class="lib-name ellipsis">
- <strong>{{ lib.name }}</strong>
- <span *ngIf="lib.version && lib.version !== 'N/A'">{{ lib.version }}</span>
+ <div class="lib-name lib-name-col ellipsis" >
+ <span [matTooltip]="lib.name + ' ' + lib.version" matTooltipPosition="above" class="lib-name-wrapper">
+ <span class="stong" >{{ lib.name }}</span>
+ <span *ngIf="lib.version && lib.version !== 'N/A'">{{ lib.version }}</span>
+ </span>
</div>
<div class="lib-group-col">{{ groupsListMap[lib.group] }}</div>
<div class="st-group">
@@ -276,8 +344,8 @@
<div class="wrap-col">
<div class="lib-destination-col">{{ item.resource }}</div>
<div class="lib-resource-type-col">{{ item.resourceType }}</div>
- <div class="lib-status-col" ngClass="{{ item.status.toLowerCase() || 'failed' }}">{{ item.status }}
- <div class="warn-action" *ngIf="(item.status === 'failed' || item.status === 'invalid version') && notebook?.status === 'running'">
+ <div class="lib-status-col" ngClass="{{ item.status.toLowerCase() || 'failed' }}">{{ item.status.replace('_', ' ') }}
+ <div class="warn-action" *ngIf="(item.status === 'failed' || item.status.toLowerCase() === 'invalid_version') && notebook?.status === 'running'">
<div *ngIf="!item.available_versions">
<span *ngIf="!installingInProgress" (click)="reinstallLibrary(item, lib)" matTooltip="Retry installation" matTooltipPosition="above">
<i class="material-icons">replay</i>
@@ -291,7 +359,7 @@
<i class="material-icons">error_outline</i>
</div>
<div class="lib-error"
- *ngIf="item.status === 'invalid version' && item.available_versions?.length" class="lib-error"
+ *ngIf="item.status.toLowerCase() === 'invalid_version' && item.available_versions?.length" class="lib-error"
(click)="openLibInfo(item, 'available');$event.stopPropagation()"
matTooltip="Show available version" matTooltipPosition="above"
>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
index 044ff8f..86cd434 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
@@ -184,19 +184,28 @@ ul.resources{
width: 50%;
padding-bottom: 0;
- .label {
- width: 20%;
+ &.java-library-search{
+ width: 100%;
+
+ .label{
+ width: 10%;
+ }
+
+ .control{
+ width: 85%;
+ }
}
- }
- .other-message{
- height: 22px;
- display: flex;
- align-items: center;
+ .control{
+ width: 70%;
- span{
- font-size: 12px;
- color: $link-color;
+ input{
+ font-size: 14px;
+ }
+ }
+
+ .label {
+ width: 20%;
}
}
@@ -205,6 +214,7 @@ ul.resources{
padding-bottom: 0;
flex-direction: column;
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
+ margin-top: 25px;
.mat-form-field-flex {
padding-left: 15px;
@@ -217,7 +227,7 @@ ul.resources{
&.mat-form-field {
width: 100%;
- //padding: 5px 20px;
+
.mat-form-field-infix{
display: flex;
}
@@ -287,7 +297,7 @@ ul.resources{
}
.list-selected {
- padding: 0 5px;
+ padding: 10px;
font-family: 'Open Sans', sans-serif;
height: 130px;
overflow-y: auto;
@@ -323,10 +333,6 @@ mat-chip.mat-chip:not(.mat-basic-chip) {
line-height: 40px;
}
-.list-header+div{
- padding-left: 5px;
-}
-
.mat-dialog-container {
position: relative;
}
@@ -355,18 +361,17 @@ mat-chip.mat-chip:not(.mat-basic-chip) {
}
}
}
- .lib-col{
- padding-left: 4px;
-
- }
.lib-name {
width: 27%;
- &.lib-input{
+ &-col{
+ display: flex;
}
.lib-name-wrapper{
+ overflow: hidden;
display: block;
+ text-overflow: ellipsis;
}
strong {
@@ -552,19 +557,29 @@ mat-chip.mat-chip:not(.mat-basic-chip) {
line-height: 26px;
}
-.m-top-20{
+.control-relative{
position: relative;
- .plus-icon{
+
+ .plus-icon {
position: absolute;
- right: 70px;
+ right: -40px;
top: 5px;
color: #35afd5;
font-size: 27px;
cursor: pointer;
- &.not-allow{
+
+ &.not-allow {
color: lightgray;
}
}
+
+ .other-message{
+ position: absolute;
+ font-size: 12px;
+ color: $link-color;
+ top: 40px;
+ left: 12px;
+ }
}
@media screen and (min-width: 1281px) {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
index ed5fa6d..97e94f7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
@@ -18,7 +18,7 @@
*/
-import {Component, OnInit, ViewChild, ViewEncapsulation, ChangeDetectorRef, Inject, OnDestroy} from '@angular/core';
+import {Component, OnInit, ViewChild, ViewEncapsulation, ChangeDetectorRef, Inject, OnDestroy, AfterViewInit} from '@angular/core';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { FormControl } from '@angular/forms';
import { ToastrService } from 'ngx-toastr';
@@ -45,7 +45,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
public model: InstallLibrariesModel;
public notebook: any;
- public filteredList: any;
+ public filteredList: any = [];
public groupsList: Array<string>;
public notebookLibs: Array<any> = [];
public notebookFailedLibs: Array<any> = [];
@@ -57,7 +57,6 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
public uploading: boolean = false;
public libs_uploaded: boolean = false;
public validity_format: string = '';
-
public isInstalled: boolean = false;
public isInSelectedList: boolean = false;
public installingInProgress: boolean = false;
@@ -84,7 +83,9 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
@ViewChild('trigger', { static: false }) matAutoComplete;
public isLibInfoOpened = { };
private isLibExist: boolean;
- lib: Library = {name: '', version: ''};
+ public lib: Library = {name: '', version: ''};
+ public javaLib: {group, artifact, version} = {group: '', artifact: '', version: ''};
+ private selectedLib: any = null;
constructor(
@Inject(MAT_DIALOG_DATA) public data: any,
@@ -99,10 +100,13 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
ngOnInit() {
this.open(this.data);
- this.libSearch.valueChanges.pipe(
+ this.libSearch.disable();
+ this.libSearch.valueChanges
+ .pipe(
debounceTime(1000))
.subscribe(newValue => {
- this.query = newValue || '';
+ this.query = newValue;
+ this.isDuplicated(this.lib);
this.filterList();
});
}
@@ -146,7 +150,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
public filterList(): void {
this.validity_format = '';
- (this.lib.name.length >= 2 && this.group) ? this.getFilteredList() : this.filteredList = null;
+ (this.query && this.query.length >= 2 && this.group && !this.selectedLib) ? this.getFilteredList() : this.filteredList = null;
}
public filterGroups(groupsList) {
@@ -160,6 +164,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
public onUpdate($event) {
if ($event.model.type === 'group_lib') {
+ this.libSearch.enable();
this.group = $event.model.value;
} else if ($event.model.type === 'destination') {
this.resetDialog();
@@ -169,6 +174,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
: this.model.computational_name = null;
this.uploadLibGroups();
this.getInstalledLibsByResource();
+ this.libSearch.disable();
}
this.filterList();
}
@@ -178,37 +184,50 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
}
public isDuplicated(item) {
- const select = { group: this.group, name: item.name, version: item.version };
-
- this.isInSelectedList = this.model.selectedLibs.filter(el => JSON.stringify(el) === JSON.stringify(select)).length > 0;
-
- if (this.destination && this.destination.libs)
- this.isInstalled = this.destination.libs.findIndex(libr => {
- return select.group !== 'java'
- ? select.name === libr.name && select.group === libr.group && select.version === libr.version
- : select.name === libr.name && select.group === libr.group;
- }) >= 0;
+ if (this.filteredList) {
+ if (this.group !== 'java') {
+ this.selectedLib = this.filteredList.find(lib => lib.name === item.name);
+ } else {
+ this.selectedLib = this.filteredList.find(lib => {
+ return lib.name === item.name.substring(0, item.name.lastIndexOf(':'));
+ });
+ }
+ } else {
+ this.selectedLib = null;
+ }
- return this.isInSelectedList || this.isInstalled;
+ if (this.selectedLib) {
+ this.filteredList = null;
+ }
}
public addLibrary(item): void {
- this.model.selectedLibs.push({ group: this.group, name: item.name, version: item.version || 'N/A' });
- this.query = '';
- this.libSearch.setValue('');
- this.lib = {name: '', version: ''};
- this.filteredList = null;
+ if (this.selectedLib && !this.selectedLib.isInSelectedList) {
+ this.model.selectedLibs.push({ group: this.group, name: item.name, version: item.version || 'N/A' });
+ this.query = '';
+ this.libSearch.setValue('');
+ this.lib = {name: '', version: ''};
+ this.filteredList = null;
+ }
}
public selectLibrary(item): void {
- // this.model.selectedLibs.push({ group: this.group, name: item.name, version: item.version });
- // this.query = '';
- this.libSearch.setValue(item.name);
- this.filteredList = null;
+ if (item.isInSelectedList) {
+ return;
+ }
+ if (this.group === 'java') {
+ this.libSearch.setValue(item.name + ':' + item.version);
+ this.lib.name = item.name + ':' + item.version;
+ } else {
+ this.libSearch.setValue(item.name);
+ this.lib.name = item.name;
+ }
+ this.matAutoComplete.closePanel();
}
public removeSelectedLibrary(item): void {
this.model.selectedLibs.splice(this.model.selectedLibs.indexOf(item), 1);
+ this.getMatchedLibs();
}
public open(notebook): void {
@@ -238,7 +257,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
public isInstallingInProgress(): void {
this.installingInProgress = this.notebookLibs.some(lib => lib.filteredStatus.some(status => status.status === 'installing'));
if (this.installingInProgress) {
- clearTimeout(this.loadLibsTimer);
+ window.clearTimeout(this.loadLibsTimer);
this.loadLibsTimer = window.setTimeout(() => this.getInstalledLibrariesList(), 10000);
}
}
@@ -307,7 +326,20 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
if (this.group === 'java') {
this.model.getDependencies(this.query)
.subscribe(
- lib => this.filteredList = [lib],
+ libs => {
+ this.filteredList = [libs];
+ this.filteredList.forEach(lib => {
+ lib.isInSelectedList = this.model.selectedLibs.some(el => lib.name === el.name.substring(0, el.name.lastIndexOf(':')));
+ lib.isInstalled = this.notebookLibs.some(libr => {
+ // && lib.version === item.name.substring(item.name.lastIndexOf(':') + 1
+ return lib.name === libr.name.substring(0, libr.name.lastIndexOf(':')) &&
+ this.group === libr.group &&
+ libr.status.some(res => res.resource === this.destination.name);
+ }
+ );
+ });
+ this.isDuplicated(this.lib);
+ },
error => {
if (error.status === HTTP_STATUS_CODES.NOT_FOUND
|| error.status === HTTP_STATUS_CODES.BAD_REQUEST
@@ -317,12 +349,23 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
}
});
} else {
+ this.getMatchedLibs();
+ }
+ }
+
+ private getMatchedLibs() {
+ if (this.query.length > 1) {
this.model.getLibrariesList(this.group, this.query)
.subscribe((libs: Library[]) => {
- console.log('libs', libs);
- console.log(this.query.slice(0, this.query.indexOf(':')));
- this.isLibExist = libs.some(v => v.name === this.query.slice(0, this.query.indexOf(':')));
+ this.isLibExist = libs.some(v => v.name === this.query);
this.filteredList = libs;
+ this.filteredList.forEach(lib => {
+ lib.isInSelectedList = this.model.selectedLibs.some(el => el.name === lib.name);
+ lib.isInstalled = this.notebookLibs.some(libr => lib.name === libr.name &&
+ this.group === libr.group &&
+ libr.status.some(res => res.resource === this.destination.name));
+ });
+ this.isDuplicated(this.lib);
});
}
}
@@ -341,7 +384,7 @@ export class InstallLibrariesComponent implements OnInit, OnDestroy {
this.isInSelectedList = false;
this.uploading = false;
this.model.selectedLibs = [];
- this.filteredList = null;
+ this.filteredList = [];
this.groupsList = [];
clearTimeout(this.clear);
@@ -441,54 +484,16 @@ export class ErrorLibMessageDialogComponent {
<!-- </mat-list>-->
<div class="lib-list" *ngIf="data.type === 'added'">
- <span class="strong">Dependency: </span>{{data.lib.add_pkgs.join(', ')}}
+ <span class="strong dependency-title">Dependency: </span><span class="packeges" *ngFor="let pack of data.lib.add_pkgs">{{pack+', '}}</span>
</div>
<div class="lib-list" *ngIf="data.type === 'available'">
-<!-- <p class="terminated">Version is not available</p>-->
<span class="strong">Available versions: </span>{{data.lib.available_versions.join(', ')}}
</div>
-<!-- <div class="text-center">-->
-<!-- <button type="button" class="butt" mat-raised-button (click)="dialogRef.close()">Close</button>-->
-<!-- </div>-->
`,
styles: [ `
.lib-list { max-height: 200px; overflow-x: auto; word-break: break-all; padding: 20px 30px !important; margin: 20px 0; color: #577289;}
- .terminated{padding-bottom: 15px;}
-
- .mat-list-base {
- padding: 40px 30px;
- }
-
- .object {
- width: 70%;
- display: flex;
- align-items: center;
- padding-right: 10px;
- }
-
- .size {
- width: 30%;
- }
- .scrolling-content.delete-list {
- max-height: 200px;
- overflow-y: auto;
- padding-top: 11px;
- }
-
- .empty-list {
- display: flex;
- width: 100%;
- justify-content: center;
- color: #35afd5;
- padding: 15px;
- }
-
- .list-header {
- border-top: 1px solid #edf1f5;
- border-bottom: 1px solid #edf1f5;
- color: #577289;
- width: 100%;
- }
+ .packeges { padding-left: 7px; line-height: 23px;}
+ .dependency-title{ line-height: 23px; }
`
]
})
diff --git a/services/self-service/src/main/resources/webapp/src/styles.scss b/services/self-service/src/main/resources/webapp/src/styles.scss
index cc18983..459f495 100644
--- a/services/self-service/src/main/resources/webapp/src/styles.scss
+++ b/services/self-service/src/main/resources/webapp/src/styles.scss
@@ -140,7 +140,8 @@ mat-chip.mat-chip strong {
.terminating,
.failed,
.deleting,
-.deleted {
+.deleted,
+.invalid_version{
color: #f1696e;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org