From fd95ac71b83f8e5f9a6f93882f268db52428217c Mon Sep 17 00:00:00 2001 From: Mike Conway Date: Tue, 7 Nov 2017 14:13:04 -0500 Subject: [PATCH] #15 mysql testing..pause for now --- .../utils/MysqlSpecificQueryProviderImpl.java | 488 ++++++++++++++++++ .../SpecificQueryProviderFactoryImpl.java | 2 +- .../SpecificQueryProviderFactoryImplTest.java | 9 + .../resources/i18n/messages_en.properties | 65 ++- .../views/collections/collectionInfo.html | 26 +- 5 files changed, 550 insertions(+), 40 deletions(-) create mode 100644 src/emc-metalnx-services/src/main/java/com/emc/metalnx/services/irods/utils/MysqlSpecificQueryProviderImpl.java diff --git a/src/emc-metalnx-services/src/main/java/com/emc/metalnx/services/irods/utils/MysqlSpecificQueryProviderImpl.java b/src/emc-metalnx-services/src/main/java/com/emc/metalnx/services/irods/utils/MysqlSpecificQueryProviderImpl.java new file mode 100644 index 000000000..d9e686195 --- /dev/null +++ b/src/emc-metalnx-services/src/main/java/com/emc/metalnx/services/irods/utils/MysqlSpecificQueryProviderImpl.java @@ -0,0 +1,488 @@ +/** + * + */ +package com.emc.metalnx.services.irods.utils; + +import java.util.List; + +import com.emc.metalnx.core.domain.entity.DataGridFilePropertySearch; +import com.emc.metalnx.core.domain.entity.DataGridMetadataSearch; +import com.emc.metalnx.core.domain.entity.enums.DataGridSearchOperatorEnum; +import com.emc.metalnx.core.domain.entity.enums.FilePropertyField; + +/** + * Supply specific queries for the MySql database + * + * @author Mike Conway - NIEHS + * + */ +public class MysqlSpecificQueryProviderImpl implements SpecificQueryProvider { + + /** + * + */ + public MysqlSpecificQueryProviderImpl() { + } + + /* + * (non-Javadoc) + * + * @see com.emc.metalnx.services.irods.utils.SpecificQueryProvider# + * buildSpecificQueryForMetadataSearch(java.util.List, java.lang.String, + * boolean) + */ + @Override + public String buildSpecificQueryForMetadataSearch(List metadataSearch, String zone, + boolean searchAgainstColls) { + // This is the first part of the query. It selects all objects (collections or + // data objects) + // that has a piece of metadata matching the query + StringBuilder objQuery = new StringBuilder(); + + // This is the query that actually looks for metadata tags in the data grid. + StringBuilder metadataSearchQuery = new StringBuilder(); + + // This is the last part of the query. It groups the objects by their attributes + // in order to + // have unique results. + StringBuilder gb = new StringBuilder(); + + // This is the final query that will be sent to the data grid database + StringBuilder q = new StringBuilder(); + + if (searchAgainstColls) { + objQuery.append(" SELECT obj_name, parent_path, obj_owner, create_ts, modify_ts, resc_name, totalMatches"); + objQuery.append(" FROM ("); + objQuery.append(" SELECT c.coll_name as obj_name,"); + objQuery.append(" c.parent_coll_name as parent_path,"); + objQuery.append(" c.coll_owner_name as obj_owner,"); + objQuery.append(" c.create_ts as create_ts,"); + objQuery.append(" c.modify_ts as modify_ts,"); + objQuery.append(" '' as resc_name,"); + objQuery.append(" c.coll_inheritance,"); + objQuery.append(" COUNT(c.coll_name) as totalMatches"); + objQuery.append(" FROM "); + objQuery.append(" r_coll_main c "); + objQuery.append(" JOIN ( "); + + gb.append(" ) AS coll_metadata ON (c.coll_id = map_object_id) "); + gb.append(" GROUP BY "); + gb.append(" c.coll_name,"); + gb.append(" c.parent_coll_name,"); + gb.append(" c.coll_owner_name,"); + gb.append(" c.create_ts,"); + gb.append(" c.modify_ts,"); + gb.append(" resc_name,"); + gb.append(" c.coll_inheritance"); + gb.append(" ORDER BY totalMatches DESC, c.coll_name "); + gb.append(" ) AS ms "); + } else { + objQuery.append( + " SELECT obj_name, size, obj_owner, repl_num, create_ts, modify_ts, resc_name, parent_path, totalMatches"); + objQuery.append(" FROM ("); + objQuery.append(" SELECT "); + objQuery.append(" d.data_name as obj_name, "); + objQuery.append(" d.data_size as size, "); + objQuery.append(" d.data_owner_name as obj_owner, "); + objQuery.append(" d.data_repl_num as repl_num, "); + objQuery.append(" d.create_ts as create_ts,"); + objQuery.append(" d.modify_ts as modify_ts, "); + objQuery.append(" d.resc_name as resc_name, "); + objQuery.append(" c.coll_name as parent_path,"); + objQuery.append(" COUNT(d.data_name) as totalMatches"); + objQuery.append(" FROM r_data_main d "); + objQuery.append(" JOIN r_coll_main c ON (d.coll_id = c.coll_id) "); + objQuery.append(" JOIN ( "); + + gb.append(" ) AS data_obj_metadata ON (d.data_id = map_object_id) "); + gb.append(" GROUP BY "); + gb.append(" d.data_name,"); + gb.append(" d.data_size,"); + gb.append(" d.data_owner_name,"); + gb.append(" d.data_repl_num,"); + gb.append(" d.create_ts,"); + gb.append(" d.modify_ts,"); + gb.append(" d.resc_name, "); + gb.append(" c.coll_name"); + gb.append(" ORDER BY totalMatches DESC, d.data_name "); + gb.append(" ) AS ms "); + } + + for (DataGridMetadataSearch d : metadataSearch) { + metadataSearchQuery.append(d.getSpecQueryAsString()); + + // appending conditions + if (metadataSearch.indexOf(d) != metadataSearch.size() - 1) { + metadataSearchQuery.append(" UNION ALL "); + } + } + + // combining the three parts of the metadata query into a single SQL query + q.append(objQuery.toString()); + q.append(metadataSearchQuery.toString()); + q.append(gb.toString()); + + return q.toString(); + } + + /* + * (non-Javadoc) + * + * @see com.emc.metalnx.services.irods.utils.SpecificQueryProvider# + * buildWhereClauseForDataGridPropertySearch(com.emc.metalnx.core.domain.entity. + * enums.FilePropertyField, + * com.emc.metalnx.core.domain.entity.enums.DataGridSearchOperatorEnum, + * java.lang.String) + */ + @Override + public String buildWhereClauseForDataGridPropertySearch(FilePropertyField inAttribute, + DataGridSearchOperatorEnum inOperator, String inValue) { + + String whereClause = new String(); + + String attribute = inAttribute.getFieldName().replaceAll(SpecificQueryConstants.propFieldsRegex, ""); + String operator = inOperator.toString(); + String value = inValue.replaceAll(SpecificQueryConstants.regexForValue, ""); + boolean isAttributeEqualsDate = inAttribute == FilePropertyField.CREATION_DATE + || inAttribute == FilePropertyField.MODIFICATION_DATE; + + if (inOperator == DataGridSearchOperatorEnum.LIKE || inOperator == DataGridSearchOperatorEnum.NOT_LIKE) { + whereClause = String.format(" LOWER( fileProperties.%s ) %s LOWER( '%%%s%%' )", attribute, operator, value); + } else if (isAttributeEqualsDate && inOperator == DataGridSearchOperatorEnum.EQUAL) { + whereClause = String.format(" fileProperties.%s BETWEEN %s AND %d", attribute, value, + Long.parseLong(value) + 60); + } else if (isAttributeEqualsDate || inAttribute == FilePropertyField.REPLICA_NUMBER + || inAttribute == FilePropertyField.SIZE) { + whereClause = String.format(" fileProperties.%s %s %s", attribute, operator, value); + } else { + whereClause = String.format(" LOWER( fileProperties.%s ) %s LOWER( '%s' )", attribute, operator, value); + } + + return whereClause; + + } + + /* + * (non-Javadoc) + * + * @see com.emc.metalnx.services.irods.utils.SpecificQueryProvider# + * addOffsetAndLimitToQuery(java.lang.String, int, int) + */ + @Override + public String addOffsetAndLimitToQuery(String query, int offset, int limit) { + return null; + } + + /* + * (non-Javadoc) + * + * @see com.emc.metalnx.services.irods.utils.SpecificQueryProvider# + * buildQueryForCountOfItemsMatchingMetadataSearch(java.util.List, + * java.lang.String, boolean) + */ + @Override + public String buildQueryForCountOfItemsMatchingMetadataSearch(List metadataSearch, + String zone, boolean searchAgainstColls) { + StringBuilder query = new StringBuilder(); + + query.append("WITH searchMetadata AS ("); + query.append(this.buildSpecificQueryForMetadataSearch(metadataSearch, zone, searchAgainstColls)); + query.append(") "); + query.append("SELECT COUNT(*) "); + query.append("FROM searchMetadata "); + return query.toString(); + } + + /* + * (non-Javadoc) + * + * @see com.emc.metalnx.services.irods.utils.SpecificQueryProvider# + * buildQueryCountItemsMatchingPropertiesSearch(java.util.List, + * java.lang.String, boolean) + */ + @Override + public String buildQueryCountItemsMatchingPropertiesSearch(List filePropertiesSearch, + String zone, boolean searchAgainstColls) { + + StringBuilder query = new StringBuilder(); + StringBuilder selStringBuilder = new StringBuilder(); + + if (searchAgainstColls) { + selStringBuilder.append(buildSelectClauseForCountCollectionsForPropertiesSearch()); + } else { + selStringBuilder.append(buildSelectClauseForCountDataObjectsForPropertiesSearch()); + } + + query.append("SELECT COUNT(*) FROM ( "); + query.append(selStringBuilder); + query.append(" ) AS fileProperties WHERE "); + + for (int i = 0; i < filePropertiesSearch.size(); i++) { + + query.append(buildWhereClauseForDataGridPropertySearch(filePropertiesSearch.get(i).getAttribute(), + filePropertiesSearch.get(i).getOperator(), filePropertiesSearch.get(i).getValue())); + + if (i < filePropertiesSearch.size() - 1) { + query.append(" AND "); + } + } + return query.toString(); + } + + @Override + public String buildQueryForFilePropertiesSearch(List filePropertiesSearches, + String zone, boolean searchAgainstColls, int offset, int limit) { + + StringBuilder query = new StringBuilder(); + + if (filePropertiesSearches.size() > 0) { + if (searchAgainstColls) { + query.append(buildSelectClauseForCollectionsForPropertiesSearch()); + } else { + query.append(buildSelectClauseForDataObjectsForPropertiesSearch()); + } + + for (DataGridFilePropertySearch filePropertiesSearch : filePropertiesSearches) { + + // where clause - conditions + query.append(buildWhereClauseForDataGridPropertySearch(filePropertiesSearch.getAttribute(), + filePropertiesSearch.getOperator(), filePropertiesSearch.getValue())); + + // appending conditions + if (filePropertiesSearches.indexOf(filePropertiesSearch) != filePropertiesSearches.size() - 1) { + query.append(" AND "); + } + } + } + + if (offset == 0 && limit == 0) { + // ignored + } else { + query.append(" OFFSET "); + query.append(offset); + query.append(" LIMIT "); + query.append(limit); + } + + return query.toString(); + + } + + /** + * select clause for count data objects matching file properties query + * + * @return String with select + */ + private String buildSelectClauseForCountDataObjectsForPropertiesSearch() { + StringBuilder sb = new StringBuilder(); + sb.append("SELECT r_data_main.data_name as name, r_data_main.data_repl_num as repl_num,"); + sb.append(" r_data_main.data_owner_name as owner_name, r_data_main.data_owner_zone as owner_zone, "); + sb.append(" r_data_main.data_size as size, r_data_main.resc_name, "); + sb.append( + " CASE WHEN r_coll_main.parent_coll_name = '/' THEN '/' || r_data_main.data_name ELSE r_coll_main.coll_name || '/' || r_data_main.data_name END as path, "); + sb.append(" r_data_main.data_checksum as checksum, CAST(r_data_main.create_ts AS BIGINT), "); + sb.append(" CAST(r_data_main.modify_ts AS BIGINT) FROM r_data_main INNER JOIN r_coll_main ON "); + sb.append(" r_data_main.coll_id = r_coll_main.coll_id"); + return sb.toString(); + + } + + /** + * select clause for count collections matching file properties query + * + * @return String with select + */ + private String buildSelectClauseForCountCollectionsForPropertiesSearch() { + StringBuilder sb = new StringBuilder(); + + sb.append( + "SELECT replace(r_coll_main.coll_name, r_coll_main.parent_coll_name || '/', '') AS name, 0 AS repl_num,"); + sb.append(" r_coll_main.coll_owner_name AS owner_name, r_coll_main.coll_owner_zone AS owner_zone, 0 AS size, "); + sb.append(" '' AS resc_name, r_coll_main.coll_name AS path, '' AS checksum, "); + sb.append(" CAST(r_coll_main.create_ts AS BIGINT), CAST(r_coll_main.modify_ts AS BIGINT) FROM r_coll_main "); + return sb.toString(); + } + + private String buildSelectClauseForDataObjectsForPropertiesSearch() { + StringBuilder query = new StringBuilder(); + query.append("SELECT * FROM ( "); + query.append(" SELECT"); + query.append(" r_data_main.data_name AS name,"); + query.append(" r_data_main.data_repl_num AS repl_num,"); + query.append(" r_data_main.data_owner_name AS owner_name,"); + query.append(" r_data_main.data_owner_zone AS owner_zone,"); + query.append(" r_data_main.data_size AS size,"); + query.append(" r_data_main.resc_name,"); + query.append( + " CASE WHEN r_coll_main.parent_coll_name = '/' THEN '/' || r_data_main.data_name ELSE r_coll_main.coll_name || '/' || r_data_main.data_name END AS path,"); + query.append(" r_data_main.data_checksum AS checksum,"); + query.append(" CAST(r_data_main.create_ts AS BIGINT), "); + query.append(" CAST(r_data_main.modify_ts AS BIGINT) "); + query.append(" FROM"); + query.append(" r_data_main "); + query.append(" INNER JOIN "); + query.append(" r_coll_main "); + query.append(" ON "); + query.append(" r_data_main.coll_id = r_coll_main.coll_id "); + query.append(" ) AS fileProperties "); + query.append("WHERE "); + + return query.toString(); + } + + private String buildSelectClauseForCollectionsForPropertiesSearch() { + StringBuilder query = new StringBuilder(); + query.append("SELECT * FROM ( "); + query.append(" SELECT"); + query.append(" replace(r_coll_main.coll_name, r_coll_main.parent_coll_name || '/', '') AS name, "); + query.append(" 0 AS repl_num, "); + query.append(" r_coll_main.coll_owner_name AS owner_name, "); + query.append(" r_coll_main.coll_owner_zone AS owner_zone, "); + query.append(" 0 AS size, "); + query.append(" '' AS resc_name, "); + query.append(" r_coll_main.coll_name AS path, "); + query.append(" '' AS checksum, "); + query.append(" CAST(r_coll_main.create_ts AS BIGINT), "); + query.append(" CAST(r_coll_main.modify_ts AS BIGINT) "); + query.append(" FROM"); + query.append(" r_coll_main "); + query.append(" ) AS fileProperties "); + query.append("WHERE "); + + return query.toString(); + } + + @Override + public String buildSelectTotalDataObjectsUnderPathThatMatchSearchText(String parentPath, String searchText) { + StringBuilder query = new StringBuilder(); + query.append(" WITH countDataObjectsThatMatchSearchText AS ( "); + query.append(" select distinct on (d.data_name) "); + query.append(" d.data_name,"); + query.append(" d.data_id,"); + query.append(" d.data_repl_num,"); + query.append(" d.data_version,"); + query.append(" d.data_type_name,"); + query.append(" d.data_size,"); + query.append(" d.resc_group_name,"); + query.append(" d.resc_name,"); + query.append(" d.data_path,"); + query.append(" d.data_owner_name,"); + query.append(" d.data_owner_zone,"); + query.append(" d.data_is_dirty,"); + query.append(" d.data_status,"); + query.append(" d.data_checksum,"); + query.append(" d.data_expiry_ts,"); + query.append(" d.data_map_id,"); + query.append(" d.data_mode,"); + query.append(" d.r_comment,"); + query.append(" d.create_ts,"); + query.append(" d.modify_ts,"); + query.append(" d.resc_hier "); + query.append("from "); + query.append(" R_DATA_MAIN d, "); + query.append(" R_COLL_MAIN c "); + query.append("where "); + query.append(" c.coll_id = d.coll_id "); + query.append(" AND "); + query.append(" c.coll_name = ? "); + query.append(" AND "); + query.append(" d.data_name ILIKE ? "); + query.append(" ) "); + query.append(" SELECT COUNT(*) FROM countDataObjectsThatMatchSearchText "); + return query.toString(); + } + + @Override + public String buildSelectTotalCollectionsUnderPathThatMatchSearchText(String parentPath, String searchText) { + StringBuilder query = new StringBuilder(); + query.append("WITH searchMatchForCollections AS ("); + query.append(" select "); + query.append(" c.coll_id,"); + query.append(" c.coll_name,"); + query.append(" c.parent_coll_name,"); + query.append(" c.coll_owner_name,"); + query.append(" c.coll_owner_zone,"); + query.append(" c.coll_inheritance,"); + query.append(" c.coll_type,"); + query.append(" c.r_comment,"); + query.append(" c.create_ts,"); + query.append(" c.modify_ts "); + query.append("from "); + query.append(" R_COLL_MAIN c "); + query.append("where "); + query.append(" c.coll_name ILIKE ?"); + query.append(" and "); + query.append(" c.parent_coll_name = ? "); + query.append(") "); + query.append("SELECT COUNT(*) "); + query.append("FROM searchMatchForCollections "); + return query.toString(); + } + + @Override + public String buildSelectDataObjectsUnderPathThatMatchSearchText(String parentPath, String searchText, int offset, + int limit, int orderColumn, String orderDir) { + StringBuilder query = new StringBuilder(); + query.append(" select "); + query.append(" data_name,"); + query.append(" coll_name,"); + query.append(" data_id,"); + query.append(" data_size,"); + query.append(" data_path,"); + query.append(" data_owner_name,"); + query.append(" data_owner_zone,"); + query.append(" create_ts,"); + query.append(" modify_ts "); + query.append(" from ( "); + query.append(" select distinct on (d.data_name) "); + query.append(" d.* , "); + query.append(" c.coll_name "); + query.append(" from "); + query.append(" R_DATA_MAIN d "); + query.append(" left join "); + query.append(" R_COLL_MAIN c "); + query.append(" on (c.coll_id = d.coll_id) "); + query.append(" where "); + query.append(" c.coll_name = ? "); + query.append(" AND "); + query.append(" d.data_name ILIKE ? "); + query.append(" ) searchDataObjsByMetadata "); + query.append(" order by " + MiscSpecificQueryUtils.getMapColumnsForDataObjects().get(orderColumn) + " " + + orderDir + " "); + query.append(" offset ? "); + query.append(" limit ? "); + return query.toString(); + } + + @Override + public String buildSelectCollectionsUnderPathThatMatchSearchText(String parentPath, String searchText, int offset, + int limit, int orderColumn, String orderDir) { + // Build specific query SQL command to retrieve data objects + // on the collection taking the offset and limit into account. + StringBuilder query = new StringBuilder(); + query.append("select "); + query.append(" c.coll_id,"); + query.append(" c.coll_name,"); + query.append(" c.parent_coll_name,"); + query.append(" c.coll_owner_name,"); + query.append(" c.coll_owner_zone,"); + query.append(" c.coll_inheritance,"); + query.append(" c.coll_type,"); + query.append(" c.r_comment,"); + query.append(" c.create_ts,"); + query.append(" c.modify_ts "); + query.append("from "); + query.append(" R_COLL_MAIN c "); + query.append("where "); + query.append(" c.coll_name ILIKE ?"); + query.append(" and "); + query.append(" c.parent_coll_name = ? "); + query.append("order by " + MiscSpecificQueryUtils.getMapColumnsForCollections().get(orderColumn) + " " + + orderDir + " "); + query.append("offset ? "); + query.append("limit ? "); + return query.toString(); + + } + +} diff --git a/src/emc-metalnx-services/src/main/java/com/emc/metalnx/services/irods/utils/SpecificQueryProviderFactoryImpl.java b/src/emc-metalnx-services/src/main/java/com/emc/metalnx/services/irods/utils/SpecificQueryProviderFactoryImpl.java index d90e525e8..74ff3b056 100644 --- a/src/emc-metalnx-services/src/main/java/com/emc/metalnx/services/irods/utils/SpecificQueryProviderFactoryImpl.java +++ b/src/emc-metalnx-services/src/main/java/com/emc/metalnx/services/irods/utils/SpecificQueryProviderFactoryImpl.java @@ -46,7 +46,7 @@ public SpecificQueryProvider instance(final IcatTypeEnum icatTypeEnum) throws Un provider = new PostgresSpecificQueryProviderImpl(); break; case MYSQL: - provider = null; + provider = new MysqlSpecificQueryProviderImpl(); break; default: throw new UnsupportedDataGridFeatureException("unable to handle specific queries to database"); diff --git a/src/emc-metalnx-services/src/test/java/com/emc/metalnx/services/irods/utils/SpecificQueryProviderFactoryImplTest.java b/src/emc-metalnx-services/src/test/java/com/emc/metalnx/services/irods/utils/SpecificQueryProviderFactoryImplTest.java index 5d76f7f0c..21d536b3a 100644 --- a/src/emc-metalnx-services/src/test/java/com/emc/metalnx/services/irods/utils/SpecificQueryProviderFactoryImplTest.java +++ b/src/emc-metalnx-services/src/test/java/com/emc/metalnx/services/irods/utils/SpecificQueryProviderFactoryImplTest.java @@ -17,4 +17,13 @@ public void testPostgres() throws Exception { Assert.assertNotNull("null provider", actual); } + @Test + public void testMysql() throws Exception { + ClientHints clientHints = Mockito.mock(ClientHints.class); + Mockito.when(clientHints.whatTypeOfIcatIsIt()).thenReturn(IcatTypeEnum.MYSQL); + SpecificQueryProviderFactory specificQueryProviderFactory = new SpecificQueryProviderFactoryImpl(); + SpecificQueryProvider actual = specificQueryProviderFactory.instance(clientHints); + Assert.assertNotNull("null provider", actual); + } + } diff --git a/src/emc-metalnx-shared/src/main/resources/i18n/messages_en.properties b/src/emc-metalnx-shared/src/main/resources/i18n/messages_en.properties index db516246a..8309d7aee 100755 --- a/src/emc-metalnx-shared/src/main/resources/i18n/messages_en.properties +++ b/src/emc-metalnx-shared/src/main/resources/i18n/messages_en.properties @@ -14,6 +14,10 @@ # limitations under the License. # +# Misc +text.back=Back +text.info=Info + #Login login.label=Login login.username=Username @@ -201,7 +205,7 @@ profiles.validation.name.blank=The profile name is required and cannot be blank users.profile.management.page.title=Profiles users.profile.management.page.title.popover=A profile is a list of groups that can be associated to users. Profiles are very handy when different users must be associated to a common set of groups. users.profile.management.menu.title=Profiles -users.profile.management.menu.title.tooltip=Manage Profiles +users.profile.management.menu.title.tooltip=Manage Profiles users.profile.management.add.button=Add Profile users.profiles.add.group.table.results.found.label=user profile(s) found @@ -219,7 +223,7 @@ users.profile.management.add.form.table.attach.label=Attach users.profile.add.form.placeholder.name=Enter the profile name users.profile.add.form.placeholder.description=Enter the description of the profile -users.profile.removal.confirmation.label=Are you sure you want to remove the user profile +users.profile.removal.confirmation.label=Are you sure you want to remove the user profile users.profile.management.delete.button=Delete users.profile.management.edit.button=Edit @@ -248,12 +252,12 @@ groups.add.form.placeholder.group.name=Enter group name groups.add.form.placeholder.zone=Enter zone groups.list.item.edit=Edit groups.list.item.delete=Delete -groups.removal.confirmation.label=Do you really want to remove +groups.removal.confirmation.label=Do you really want to remove groups.modify.form.title=Modify Group group.collections.view.page.title=Shared group.collections.view.page.subtitle=(by groups) -group.collections.view.page.title.popover=List of collections and files shared by your groups. +group.collections.view.page.title.popover=List of collections and files shared by your groups. group.collections.results.found.label=group(s) found ##Validation @@ -295,7 +299,7 @@ resources.management.list.item.info=Info resources.management.list.view.tooltip=View Resources List resources.management.server.view.tooltip=View Resources by Server resources.management.map.view.tooltip=View Resources Map -resources.management.popover= Manage iRods Resources: View, Add and Remove. Quickly switch resources view: List, Map and Listed by Server. +resources.management.popover= Manage iRods Resources: View, Add and Remove. Quickly switch resources view: List, Map and Listed by Server. ##Add Resource Form resources.add.form.title=Add Resource @@ -338,8 +342,8 @@ resources.confirmation.deletion.title=Resource Deletion resources.confirmation.deletion.label=If you choose to delete a resource, all resources that are its direct children will become direct children of the zone and any other data existing in it will be lost. Do you want to continue? resources.deletion.not.successful.label=could not be deleted. This resource contains one or more dataObjects in it. -resources.view.servers.page.title=Resources -resources.view.map.page.title=Resources +resources.view.servers.page.title=Resources +resources.view.map.page.title=Resources resources.validation.name.duplicated=Another resource already has that name resources.validation.name.blank=The resource name is required and cannot be blank @@ -384,7 +388,7 @@ collections.management.table.owner.label=Owner collections.management.table.modified.label=Modified collections.management.table.created.label=Created collections.management.table.size.label=Size -collections.management.table.kind.label=Kind +collections.management.table.kind.label=File Type collections.management.table.action.label=Action collections.management.table.permissions.label=Permissions collections.management.table.inheritance.label=Inheritance @@ -447,6 +451,15 @@ collections.add.form.current.path=Current Path collections.add.form.current.path.alternate=Create collection in collections.add.form.dataobject.placeholder=Data Object +## Collections replica modal +collections.replica.delete=Delete Replica +collections.replica.delete.confirm=Are you really sure you want to delete this replica? +collections.replica.delete.success=Replica successfully deleted. +collections.replica.delete.failure=Replica delete failed. + +collections.error.no.permissions=You do not have permissions to access information in the target collection or for the selected object. + + collections.form.no.access.error=You do not have rights to create collection {0} ## Collection modification form @@ -473,7 +486,7 @@ metadata.search.page.title.popover=Search for files and collections by metadata metadata.search.menu.title=Search metadata.template.management.menu.title=Templates metadata.template.management.page.title=Templates -metadata.template.management.page.title.popover=A Template is a list of metadata that can be associated to one or more objects (collections of files). It can be set as public to allow other users or private to keep it visible only to its owner. +metadata.template.management.page.title.popover=A Template is a list of metadata that can be associated to one or more objects (collections of files). It can be set as public to allow other users or private to keep it visible only to its owner. metadata.template.table.name.title=Name metadata.template.table.description.title=Description metadata.template.management.result.number.found=template(s) found @@ -586,11 +599,11 @@ confirmation.deletion.label=If you choose to delete these items, they will be co confirmation.message.yes=Yes confirmation.message.no=No confirmation.message.cancel=Cancel -confirmation.add.successfully=was successfully added -confirmation.modify.successfully=successfully modified -confirmation.delete.successfully=successfully deleted +confirmation.add.successfully=was successfully added +confirmation.modify.successfully=successfully modified +confirmation.delete.successfully=successfully deleted confirmation.cancel.title=Cancel Operation -confirmation.cancel.label=If you choose to cancel this form, you will lose any unsaved data. Do you want to continue +confirmation.cancel.label=If you choose to cancel this form, you will lose any unsaved data. Do you want to continue confirmation.message.ok=Ok # Success messages @@ -640,7 +653,7 @@ bookmarks.table.group.label=Group bookmarks.result.number.found=shared link(s) found bookmarks.page.subtitle=(by users) bookmarks.page.title=Shared -bookmarks.page.title.popover=List of Collections and Files shared with by other users. +bookmarks.page.title.popover=List of Collections and Files shared with by other users. bookmarks.for.group.your.groups.label=The item(s) below are shared with you: # Shared Items @@ -671,7 +684,7 @@ ticket.table.permission.label=Permission ticket.table.owner.label=Owner ticket.table.type.label=Type ticket.delete.confirm.modal.title=Confirm Deletion -ticket.delete.confirm.modal.msg=Delete this ticket? This action cannot be undone. +ticket.delete.confirm.modal.msg=Delete this ticket? This action cannot be undone. ticket.delete.confirm.modal.button.cancel=Cancel ticket.delete.confirm.modal.button.delete=Delete this Ticket ticket.delete.feedback.success=The ticket was deleted successfully. @@ -680,17 +693,17 @@ ticket.form.path.label=Path ticket.form.permission.label=Permission ticket.form.permission.option.read.label=READ ticket.form.permission.option.write.label=WRITE -ticket.form.ticket.string.label=Ticket String +ticket.form.ticket.string.label=Ticket String ticket.form.ticket.path.label=Ticket Path -ticket.form.ticket.string.placeholder=Set a unique name for this ticket +ticket.form.ticket.string.placeholder=Set a unique name for this ticket ticket.form.uses.limit.label=Max Uses -ticket.form.uses.limit.hint=This value limits the number of objects that can be uploaded or downloaded via the ticket. For a collection, ensure this value is greater than or equal to the number of items in the collection. +ticket.form.uses.limit.hint=This value limits the number of objects that can be uploaded or downloaded via the ticket. For a collection, ensure this value is greater than or equal to the number of items in the collection. ticket.form.uses.limit.placeholder=Set a limit for uses or this ticket -ticket.form.write.byte.limit.label=Max number of bytes +ticket.form.write.byte.limit.label=Max number of bytes ticket.form.write.byte.limit.placeholder=Limit the number of bytes that can be written with this ticket ticket.form.write.file.limit.label=Max number of updates -ticket.form.write.file.limit.placeholder=Set a limit for writing on a file -ticket.form.users.label=Users +ticket.form.write.file.limit.placeholder=Set a limit for writing on a file +ticket.form.users.label=Users ticket.form.users.placeholder=Inform one or more usernames ticket.form.groups.label=Groups ticket.form.groups.placeholder=Inform one or more group names @@ -704,16 +717,16 @@ ticket.form.button.create=Create Ticket ticket.form.button.modify=Modify Ticket ticket.form.title.create=Create Ticket ticket.form.title.modify=Modify Ticket -ticket.feedback.message.creation.success=New Ticket Created - +ticket.feedback.message.creation.success=New Ticket Created - ticket.feedback.message.creation.success.copy=Copy Ticket ticket.feedback.message.creation.success.email=E-mail Ticket ticket.feedback.message.creation.failure=Ticket not created. ticket.feedback.message.modify.success=Ticket successfully modified. ticket.feedback.message.delete.all.success=Tickets successfully deleted. ticket.feedback.message.modify.failure=Ticket not modified. -ticket.form.expiration.date.label=Expiration Date -ticket.form.expiration.date.placeholder=Set the date this ticket will be invalid -ticket.form.validation.input.uses.limit.not.number=This field must be an integer. +ticket.form.expiration.date.label=Expiration Date +ticket.form.expiration.date.placeholder=Set the date this ticket will be invalid +ticket.form.validation.input.uses.limit.not.number=This field must be an integer. ticket.form.validation.input.write.byte.limit.not.number=This field must be an integer. ticket.form.validation.input.write.file.limit.not.number=This field must be an integer. ticket.form.validation.input.ticket.string.not.valid=This field can contain only 'A-Z', 'a-z', '0-9' characters. It cannot contain only numbers. @@ -737,4 +750,4 @@ rules.deletion.confirmation=Are you sure you want to permanently delete this rul rules.upload.label=Upload Rule File rules.menu.title=Rules rules.table.string.label=Rule Name -rules.title.popover=List of rules deployed on this grid. \ No newline at end of file +rules.title.popover=List of rules deployed on this grid. diff --git a/src/emc-metalnx-shared/src/main/resources/views/collections/collectionInfo.html b/src/emc-metalnx-shared/src/main/resources/views/collections/collectionInfo.html index fea389fb8..75bf5c17b 100755 --- a/src/emc-metalnx-shared/src/main/resources/views/collections/collectionInfo.html +++ b/src/emc-metalnx-shared/src/main/resources/views/collections/collectionInfo.html @@ -24,13 +24,13 @@ - +
@@ -71,7 +71,7 @@
-

Info

+

#{text.info}

@@ -95,7 +95,7 @@

Info

-
+
@@ -105,11 +105,11 @@

Info

- Created - Modified - Size - Resource - Path + #{collections.management.table.created.label} + #{collections.management.table.modified.label} + #{collections.management.table.size.label} + #{collections.management.table.resource.label} + #{collections.management.table.path.label}