Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest wiping your environment to folks with bad build outcomes. #3347

Merged
merged 6 commits into from
Dec 6, 2017
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions readthedocs/builds/static/builds/css/detail.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ div.build-detail div.build-state > span.build-state-successful {
background: #5a5;
}

div.build-detail div.build-ideas {
padding: .5em;
}

ul.build-meta {
display: block;
width: 40%;
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/core/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def wipe_version(request, project_slug, version_slug):
for del_dir in del_dirs:
broadcast(type='build', task=remove_dir, args=[del_dir])
return redirect('project_version_list', project_slug)
return render_to_response('wipe_version.html',
return render_to_response('wipe_version.html', {'version': version, 'project': version.project},
context_instance=RequestContext(request))


Expand Down
23 changes: 23 additions & 0 deletions readthedocs/templates/builds/build_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,29 @@
</span>
</div>

<div class="build-ideas">
{% if not build.success and build.commands.count < 4 %}
<p>

{% url 'wipe_version' build.version.project.slug build.version.slug as wipe_url %}
{% blocktrans %}
Having trouble with your build environment?
Try <a href="{{ wipe_url }}">reseting it</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wipe_url should be in the blocktrans variable list

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{% endblocktrans %}
</p>
{% endif %}

{% if not build.success and "setup.py install" in build.commands.last.output %}
<p>
{% url 'projects_advanced' build.version.project.slug as advanced_url %}
{% blocktrans %}
Don't want <pre>setup.py install</pre> called?
Change the <strong>Install Project</strong> setting in your <a href="{{ advanced_url }}">advanced settings</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

advanced_url should be in the blocktrans variable list

{% endblocktrans %}
</p>
{% endif %}
</div>

{% if build.output %}
{# If we have build output, this is an old build #}
<p>
Expand Down
21 changes: 18 additions & 3 deletions readthedocs/templates/wipe_version.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
{% extends "base.html" %}

{% block project_editing %}
{% with versions_active="active" %}
{% include "core/project_bar.html" %}
{% endwith %}
{% endblock %}


{% block title %}Wipe the build directories for a version {% endblock %}

{% block content %}

{% blocktrans with slug=version.slug %}
<h3>Remove build environment for <em>{{ slug }}</em> version.</h3>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove the h3 at least from the blocktrans

{% endblocktrans %}

{% if deleted %}
Your project environment has been wiped.<br><br>
{% blocktrans %}
Your project environment has been wiped.<br><br>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All <br> can be removed. Spacing should be forced with a surrounding p element, or other css.

{% endblocktrans %}
{% else %}
Having trouble getting your documentation build to complete? By clicking on the button below you'll clean out your build checkouts and environment, but not your generated documentation.
{% blocktrans %}
Having trouble getting your documentation build to complete? By clicking on the button below you'll clean out your build checkouts and environment, but not your generated documentation.
{% endblocktrans %}

<form method="post" action="#">
<input type="submit" value="Wipe version">
<input type="submit" value="Wipe {{ version.slug }}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-translated copy here

</form>
{% endif %}

Expand Down