mirror of https://github.com/rancher/ui.git
Add debug info to file issue button (rancher/rancher#3444)
This commit is contained in:
parent
294ebea810
commit
bbb83abc8c
|
|
@ -7,6 +7,27 @@ export default Ember.Component.extend({
|
|||
className: 'clearfix',
|
||||
|
||||
settings: Ember.inject.service(),
|
||||
access: Ember.inject.service(),
|
||||
|
||||
issueBody: function() {
|
||||
var str = '*Describe your issue here*\n\n\n---\n| Useful | Info |\n| :-- | :-- |\n' +
|
||||
`|Versions|Rancher \`${this.get('settings.rancherVersion')||'-'}\` ` +
|
||||
`Cattle: \`${this.get('settings.cattleVersion')||'-'}\` ` +
|
||||
`UI: \`${this.get('settings.uiVersion')||'--'}\` |\n`;
|
||||
|
||||
if ( this.get('access.enabled') )
|
||||
{
|
||||
str += `|Access|\`${this.get('access.provider').replace(/config/,'')}\`, \`${this.get('access.admin') ? 'admin' : ''}\`|\n`;
|
||||
}
|
||||
else
|
||||
{
|
||||
str += '|Access|`Disabled`}|\n';
|
||||
}
|
||||
|
||||
str += `|Route|\`${this.get('application.currentRouteName')}\`|\n`;
|
||||
|
||||
return encodeURIComponent(str);
|
||||
}.property(),
|
||||
|
||||
actions: {
|
||||
showAbout() {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
{{#if settings.rancherVersion}}
|
||||
<a href="#" {{action "showAbout"}} aria-label="About Rancher">{{settings.rancherVersion}}</a>
|
||||
{{/if}}
|
||||
<a href="#" class="btn btn-sm btn-link" {{action "showAbout"}} aria-label="About Rancher">{{if settings.rancherVersion settings.rancherVersion '(Not a Release)'}}</a>
|
||||
|
||||
{{#if helpEnabled}}
|
||||
<a class="btn btn-sm btn-link" target="blank" href="http://docs.rancher.com/rancher/">Documentation</a>
|
||||
<a class="btn btn-sm btn-link" target="blank" href="http://docs.rancher.com/rancher/faqs/">FAQs</a>
|
||||
<a class="btn btn-sm btn-link" target="blank" href="https://github.com/rancher/rancher/issues">File an Issue</a>
|
||||
<a class="btn btn-sm btn-link" target="blank" href="https://github.com/rancher/rancher/issues/new?body={{issueBody}}">File an Issue</a>
|
||||
<a class="btn btn-sm btn-link" target="blank" href="http://forums.rancher.com/">Forums</a>
|
||||
{{/if}}
|
||||
<div class="pull-right">
|
||||
|
|
@ -19,4 +17,4 @@
|
|||
<li><a {{action "composeDownload" "linux"}}>Linux <i class="icon icon-fw icon-linux"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue