You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ha...@apache.org on 2017/06/20 14:22:08 UTC
mesos git commit: Stripped spaces between directory elements in WebUI.
Repository: mesos
Updated Branches:
refs/heads/master eab0c67cb -> 3bea3fcb4
Stripped spaces between directory elements in WebUI.
Review: https://reviews.apache.org/r/58874/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3bea3fcb
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3bea3fcb
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3bea3fcb
Branch: refs/heads/master
Commit: 3bea3fcb4eef00ce469ba4f27fcfd2d3eec05aea
Parents: eab0c67
Author: haosdent huang <ha...@apache.org>
Authored: Tue Jun 20 22:17:55 2017 +0800
Committer: Haosdent Huang <ha...@apache.org>
Committed: Tue Jun 20 22:17:55 2017 +0800
----------------------------------------------------------------------
src/webui/master/static/browse.html | 17 +++++++++++------
src/webui/master/static/css/mesos.css | 10 ++++++++++
2 files changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/3bea3fcb/src/webui/master/static/browse.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/browse.html b/src/webui/master/static/browse.html
index b984919..c586b90 100644
--- a/src/webui/master/static/browse.html
+++ b/src/webui/master/static/browse.html
@@ -12,12 +12,17 @@
</ol>
<ol class="breadcrumb">
- <li ng-repeat="dir in path.split('/')">
- <a href="#/agents/{{agent_id}}/browse?path={{
- encodeURIComponent(path.split('/').slice(0, $index + 1).join('/'))}}">
- {{dir}}
- </a>
- </li>
+ <!-- We want to ensure that if the user highlights the path breadcrumb,
+ and copies it, they will receive a /path/without/spaces that they
+ can then paste into a terminal, or elsewhere. In order to do this,
+ we have to ensure there is no whitespace within the <a> tag contents.
+ Also, we have to inject a hidden '/' character because the slashes
+ in the breadcrumb are not copied.
+ -->
+ <li ng-repeat="dir in path.split('/')"><a
+ href="#/agents/{{agent_id}}/browse?path={{
+ encodeURIComponent(path.split('/').slice(0, $index + 1).join('/'))
+ }}">{{dir}}</a><span class="hidden-text">/</span></li>
</ol>
<div class="alert alert-error hidden" id="alert">
http://git-wip-us.apache.org/repos/asf/mesos/blob/3bea3fcb/src/webui/master/static/css/mesos.css
----------------------------------------------------------------------
diff --git a/src/webui/master/static/css/mesos.css b/src/webui/master/static/css/mesos.css
index 9f3de54..e807466 100644
--- a/src/webui/master/static/css/mesos.css
+++ b/src/webui/master/static/css/mesos.css
@@ -175,3 +175,13 @@ a.badge-type:hover {
-webkit-box-shadow: none;
box-shadow: none;
}
+
+/*
+ * The `hidden-text` class hides text by making the font size 0.
+ * This can be used, for example, to insert text that will be
+ * added when the user highlights and copies, while leaving
+ * the text hidden from the user.
+ */
+.hidden-text {
+ font-size: 0;
+}