Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Fix dashboard width and file list (#162)
Browse files Browse the repository at this point in the history
* Fix total count of paginated files in list call

* Fix secure data browser off screen in dashboard

* Update gradle version to 3.15.7

* Add max width to secure data browser in dashboard
  • Loading branch information
sdford authored May 30, 2018
1 parent f757838 commit c49aac6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dashboard/app/components/SecureDataForm/SecureDataForm.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@import '../../assets/styles/common.scss';

#add-new-secure-data-form {
width: 1150px;
width: 100%;
max-width: 1150px;
#new-secure-data-path {
display: flex;
font-size: 16px;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
# limitations under the License.
#

version=3.15.6
version=3.15.7
groupId=com.nike.cerberus
artifactId=cms
4 changes: 4 additions & 0 deletions src/main/java/com/nike/cerberus/dao/SecureDataDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ public List<SecureDataRecord> listSecureDataByPartialPathAndType(String partialP
return secureDataMapper.listSecureDataByPartialPathAndType(partialPath, type, limit, offset);
}

public int countByPartialPathAndType(String partialPath, SecureDataType type) {
return secureDataMapper.countByPartialPathAndType(partialPath, type);
}

public int countByType(SecureDataType type) {
return secureDataMapper.countByType(type);
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/nike/cerberus/mapper/SecureDataMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ List<SecureDataRecord> listSecureDataByPartialPathAndType(
@Param("limit") int limit,
@Param("offset") int offset);

int countByPartialPathAndType(@Param("partialPath") String partialPath, @Param("type") SecureDataType type);

int countByType(@Param("type") SecureDataType type);

Set<String> getPathsBySdbId(@Param("sdbId") String sdbId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public SecureFileSummaryResult listSecureFilesSummaries(String partialPath, int
partialPath = partialPath + "/";
}

int totalNumFiles = secureDataDao.countByType(SecureDataType.FILE);
int totalNumFiles = secureDataDao.countByPartialPathAndType(partialPath, SecureDataType.FILE);
List<SecureFileSummary> fileSummaries = Lists.newArrayList();
List<SecureDataRecord> secureDataRecords = secureDataDao.listSecureDataByPartialPathAndType(partialPath, SecureDataType.FILE, limit, offset);
secureDataRecords.forEach(secureDataRecord -> {
Expand Down
11 changes: 11 additions & 0 deletions src/main/resources/com/nike/cerberus/mapper/SecureDataMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,17 @@
OFFSET #{offset}
</select>

<select id="countByPartialPathAndType" resultType="java.lang.Integer">
SELECT
COUNT(ID)
FROM
SECURE_DATA
WHERE
PATH LIKE '${partialPath}%'
AND
`TYPE` = #{type}
</select>

<select id="countByType" resultType="java.lang.Integer">
SELECT
COUNT(ID)
Expand Down

0 comments on commit c49aac6

Please sign in to comment.