summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets
diff options
context:
space:
mode:
authorDrew Blessing <drew@gitlab.com>2017-11-10 14:39:00 -0600
committerDrew Blessing <drew@gitlab.com>2017-11-15 08:28:33 -0600
commit03b1bcbb686f8e56fe6c6303adacdc01c5403790 (patch)
tree45e21665a23e6ce6ce616f91b1ea5901dcbccc48 /app/assets/stylesheets
parenta4072db0198896242886d22c644ed91c1016aa8d (diff)
downloadgitlab-ce-03b1bcbb686f8e56fe6c6303adacdc01c5403790.tar.gz
Truncate tree to max 1,000 items and display notice to users
Rendering ten thousands of tree items consumes a lot of server time and can cause timeouts in extreme cases. Realistically, displaying more than 1,000 files is probably not useful so truncate and show the user a notice instead. 'Find files' can be used to locate specific files beyond the 1,000 limit.
Diffstat (limited to 'app/assets/stylesheets')
-rw-r--r--app/assets/stylesheets/pages/tree.scss7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/stylesheets/pages/tree.scss b/app/assets/stylesheets/pages/tree.scss
index 50f0ef4414a..65b334662c2 100644
--- a/app/assets/stylesheets/pages/tree.scss
+++ b/app/assets/stylesheets/pages/tree.scss
@@ -125,7 +125,7 @@
color: $white-normal;
}
- &:hover {
+ &:hover:not(.tree-truncated-warning) {
td {
background-color: $row-hover;
border-top: 1px solid $row-hover-border;
@@ -198,6 +198,11 @@
}
}
+ .tree-truncated-warning {
+ color: $orange-600;
+ background-color: $orange-100;
+ }
+
.tree-time-ago {
min-width: 135px;
color: $gl-text-color-secondary;