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',
|
className: 'clearfix',
|
||||||
|
|
||||||
settings: Ember.inject.service(),
|
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: {
|
actions: {
|
||||||
showAbout() {
|
showAbout() {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
{{#if settings.rancherVersion}}
|
<a href="#" class="btn btn-sm btn-link" {{action "showAbout"}} aria-label="About Rancher">{{if settings.rancherVersion settings.rancherVersion '(Not a Release)'}}</a>
|
||||||
<a href="#" {{action "showAbout"}} aria-label="About Rancher">{{settings.rancherVersion}}</a>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if helpEnabled}}
|
{{#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/">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="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>
|
<a class="btn btn-sm btn-link" target="blank" href="http://forums.rancher.com/">Forums</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue