Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
jangaraj committed Jan 2, 2024
1 parent b838879 commit 7a18532
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Grafana Debugger

TODO
TODO
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@mdi/font": "7.0.96",
"core-js": "^3.29.0",
"md-editor-v3": "^4.10.0",
"rison-node": "^2.1.1",
"roboto-fontface": "*",
"vue": "^3.3.0",
"vue-cookies": "^1.8.3",
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/default/Default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
|
</div>
<div class="text-no-wrap ml-2 float-left">
Star:&nbsp;<a target="_blank" href="https://github.com/jangaraj/gv">GitHub repository</a>
Star:&nbsp;<a target="_blank" href="hhttps://github.com/monitoringartist/grafana-debugger">GitHub repository</a>
</div>
<div class="ml-2 float-left">
|
</div>
<div class="text-no-wrap ml-2 float-left">
Feedback:&nbsp;<a target="_blank" href="https://github.com/jangaraj/gv/issues/new">New GitHub issue</a>
Feedback:&nbsp;<a target="_blank" href="hhttps://github.com/monitoringartist/grafana-debugger/issues/new">New GitHub issue</a>
</div>

</v-card>
Expand Down
77 changes: 44 additions & 33 deletions src/views/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<v-stepper-window-item :value="1">
<v-card title="Introduction" flat>
<v-card-text>
Grafana debugger provides a structured guide on resolving issues with Grafana, covering aspects such as configuration, visualization creation, and queries.
Grafana Debugger provides a structured guide on resolving issues with Grafana, covering aspects such as configuration, visualization creation, and queries.
<br /><br />
A notable 73% of Grafana Debugger users swiftly identified their issues and find further resources with this tool immediately. Others are able to create community posts,
which will have much higher chance to attracts the attention of Grafana community members, because it contains all details required for quick problem assesment.
Expand All @@ -87,10 +87,11 @@

<v-divider class="ma-4"></v-divider>

Some debugging examples:
Debugging examples:
<br /><br />
<a href="#step=2&step1Version=v10.2.4&step1Type=Enterprise (Free %26 unlicensed)&step1Cloud=false&step1Installation=installed as container with orchestration&step1Os=Linux&step1DeploymentDetails=My docker-compose yaml file%3A%0A```yaml%0Aversion%3A '3.8'%0Aservices%3A%0A%20 grafana%3A%0A%20%20%20 image%3A grafana%2Fgrafana-enterprise%3Alatest%0A%20%20%20 ports%3A%0A%20%20%20%20%20 - 3000%3A3000%0A%20%20%20 environment%3A%0A%20%20%20%20%20 - GF_AUTH_ANONYMOUS_ENABLED%3Dtrue%0A%20%20%20%20%20 - GF_AUTH_ANONYMOUS_ORG_ROLE%3DAdmin%0A%20%20%20%20%20 - GF_AUTH_ANONYMOUS_ORG_NAME%3DMain Org.%0A%20%20%20%20%20 - GF_AUTH_ANONYMOUS_ORG_ID%3D1%0A%20%20%20 volumes%3A%0A%20%20%20%20%20 - grafana-storage%3A%2Fvar%2Flib%2Fgrafana%0Avolumes%3A%0A%20 grafana-storage%3A%0A```&step2WhatHappened=I don't see SAML login option in the login page.&step2WhatsExpected=I expect to see SAML login option in the login page.&step2HowReproduce=1. Open Grafana login page.%0A2. See that SAML login option is missing.&step2AdditionalDetails=I have configured SAML authentication according to the documentation. I use Azure IDP.&step3DocumentationLink=https%3A%2F%2Fgrafana.com%2Fdocs%2Fgrafana%2Flatest%2Fauth%2Fsaml%2F&step4Title=Missing SAML Login Option in Grafana Enterprise Deployment&step4Category=Authentication&step4SearchQuery=Grafana Enterprise missing SAML login option&step4Tags=saml%2Clogin%2C grafana enterprise%2C deployment%2C docker%2C linux%2C azure idp">Issue: SAML login is not available</a>

<a href="#(step:'2',step1Cloud:false,step1DeploymentDetails:'My docker-compose yaml file%3A%0A```yaml%0Aversion%3A !'3.8!'%0Aservices%3A%0A%20 grafana%3A%0A%20%20%20 image%3A grafana%2Fgrafana-enterprise%3Alatest%0A%20%20%20 ports%3A%0A%20%20%20%20%20 - 3000%3A3000%0A%20%20%20 environment%3A%0A%20%20%20%20%20 - GF_AUTH_ANONYMOUS_ENABLED%3Dtrue%0A%20%20%20%20%20 - GF_AUTH_ANONYMOUS_ORG_ROLE%3DAdmin%0A%20%20%20%20%20 - GF_AUTH_ANONYMOUS_ORG_NAME%3DMain Org.%0A%20%20%20%20%20 - GF_AUTH_ANONYMOUS_ORG_ID%3D1%0A%20%20%20 volumes%3A%0A%20%20%20%20%20 - grafana-storage%3A%2Fvar%2Flib%2Fgrafana%0Avolumes%3A%0A%20 grafana-storage%3A%0A```',step1Installation:installed as simple container,step1Os:Linux,step1Type:'Enterprise (Free %26 unlicensed)',step1Version:v10.2.3,step2AdditionalDetails:I have configured SAML authentication according to the documentation. I use Azure IDP.,step2HowReproduce:'1. Open Grafana login page.%0A2. See that SAML login option is missing.',step2WhatHappened:'I don!'t see SAML login option in the login page.',step2WhatsExpected:I expect to see SAML login option in the login page.,step3DocumentationLink:https%3A%2F%2Fgrafana.com%2Fdocs%2Fgrafana%2Flatest%2Fauth%2Fsaml%2F,step4Category:Authentication%2FIdentity Management,step4SearchQuery:Grafana SAML login option missing,step4Tags:grafana%2Csaml%2C login%2C authentication%2C azure idp,step4Title:SAML login option missing in Grafana login page)">Issue: SAML login is not available</a>
&nbsp;
<a href="#(step:'2',step1Cloud:false,step1DeploymentDetails:My%20%60start-grafana.sh%60%20script%3A%0A%60%60%60sh%0Adocker%20rm%20-f%20grafana%20%7C%7C%20true%0A%0Adocker%20run%20-d%20%5C%0A%20%20--name%20grafana%20%5C%0A%20%20-p%2080%3A80%20%5C%0A%20%20grafana%2Fgrafana%3Alatest%0A%60%60%60,step1Installation:installed%20as%20simple%20container,step1Os:Linux,step1Type:Open%20Source,step1Version:v8.2.3,step2AdditionalDetails:I%20tried%20Firefox%2C%20Chrome%2C%20Edge.%20All%20of%20them%20have%20the%20same%20problem.,step2HowReproduce:'1.%20Run%20%60start-grafana.sh%60%20script%0A2.%20Try%20to%20open%20http%3A%2F%2Flocalhost%20in%20the%20browser',step2WhatHappened:'I%20can!'t%20open%20Grafana%20on%20http%3A%2F%2Flocalhost',step2WhatsExpected:I%20can%20see%20Grafana%20on%20http%3A%2F%2Flocalhost,step3DocumentationLink:https%3A%2F%2Fgrafana.com%2Fdocs%2Fgrafana%2Flatest%2Fsetup-grafana%2Finstallation%2Fdocker%2F,step4Category:Grafana%20Troubleshooting,step4SearchQuery:Grafana%20Docker%20deployment%20access%20issue,step4Tags:grafana%2Cdeployment%2C%20docker%2C%20access%20issue%2C%20documentation,step4Title:Unable%20to%20Access%20Grafana%20after%20Deployment)">Issue: Grafana is not available on localhost</a>
</v-card-text>
</v-card>
</v-stepper-window-item>
Expand Down Expand Up @@ -315,7 +316,7 @@
Details about your on-premise Grafana deployment:
</h3>
<div v-if="step1Cloud == 'false'">
{{ step1DeploymentDetailsDescription }} Please use 3 backticks (```) to format your logs, commands or configuration files for readibility.
{{ step1DeploymentDetailsDescription }} Please use 3 backticks (```) to format your commands or configuration files for readability. Markdown formatting is supported.
</div>

<MdEditor v-if="step1Cloud == 'false'"
Expand Down Expand Up @@ -348,7 +349,7 @@
What kind of problem happened?
</h3>
<div>
Please use 3 backticks (```) to format your logs, commands or configuration files for readibility.
Please use 3 backticks (```) to format your logs, commands or configuration files for readability. Markdown formatting is supported.
</div>

<MdEditor
Expand All @@ -369,7 +370,7 @@
What did you expect to happen?
</h3>
<div>
Please use 3 backticks (```) to format your logs, commands or configuration files for readibility.
Please use 3 backticks (```) to format your logs, commands or configuration files for readability. Markdown formatting is supported.
</div>

<MdEditor
Expand All @@ -390,7 +391,7 @@
How to reproduce it?
</h3>
<div>
Please provide a steps. Please use 3 backticks (```) to format your logs, commands or configuration files for readibility.
Please provide a steps. Please use 3 backticks (```) to format your logs, commands or configuration files for readability. Markdown formatting is supported.
</div>

<MdEditor
Expand All @@ -411,7 +412,7 @@
Additional problem details
</h3>
<div>
Please provide more details, which can be usefull. Did it work before? If it worked before, what Grafana version worked correctly? Provide more details about plugin (name, version, installation method) if problem is related to plugin. Please use 3 backticks (```) to format your logs, commands or configuration files for readibility.
Please provide more details, which can be usefull. Did it work before? If it worked before, what Grafana version worked correctly? Provide more details about plugin (name, version, installation method) if problem is related to plugin. Please use 3 backticks (```) to format your logs, commands or configuration files for readability. Markdown formatting is supported.
</div>

<MdEditor
Expand Down Expand Up @@ -622,19 +623,19 @@

<v-row>
<v-col>
<v-btn color="info" @click="window.open('https://community.grafana.com/search?q='+encodeURIComponent(step4SearchQuery.replace('Grafana ', ''))+'%20order%3Alatest')">Search on Community Forum</v-btn>
<v-btn color="info" @click="window.open('https://community.grafana.com/search?q='+encodeURI(step4SearchQuery.replace('Grafana ', ''))+'%20order%3Alatest')">Search on Community Forum</v-btn>
</v-col>
<v-col>
<v-btn color="info" @click="window.open('https://stackoverflow.com/search?q=%5Bgrafana%5D+'+encodeURIComponent(step4SearchQuery).replace('Grafana ', ''))">Search on Stack Overflow</v-btn>
<v-btn color="info" @click="window.open('https://stackoverflow.com/search?q=%5Bgrafana%5D+'+encodeURI(step4SearchQuery).replace('Grafana ', ''))">Search on Stack Overflow</v-btn>
</v-col>
<v-col>
<v-btn color="info" @click="window.open('https://github.com/grafana/grafana/issues?q=is%3Aissue+'+encodeURIComponent(step4SearchQuery.replace('Grafana ', '')))">Search in Github Grafana issues</v-btn>
<v-btn color="info" @click="window.open('https://github.com/grafana/grafana/issues?q=is%3Aissue+'+encodeURI(step4SearchQuery.replace('Grafana ', '')))">Search in Github Grafana issues</v-btn>
</v-col>
<v-col>
<v-btn color="info" @click="window.open('https://www.google.com/search?q='+encodeURIComponent(step4SearchQuery))">Search on Google</v-btn>
<v-btn color="info" @click="window.open('https://www.google.com/search?q='+encodeURI(step4SearchQuery))">Search on Google</v-btn>
</v-col>
<v-col v-if="getPrompt().toLowerCase().includes('influx')">
<v-btn v-if="getPrompt().toLowerCase().includes('influx')" color="info" @click="window.open('https://community.influxdata.com/search?q='+encodeURIComponent(step4Title))">Search on Influx Community Forum</v-btn>
<v-btn v-if="getPrompt().toLowerCase().includes('influx')" color="info" @click="window.open('https://community.influxdata.com/search?q='+encodeURI(step4Title))">Search on InfluxData Forum</v-btn>
</v-col>
</v-row>

Expand Down Expand Up @@ -688,6 +689,7 @@ import 'md-editor-v3/lib/style.css';
</script>
<script>
import { useTheme } from 'vuetify'
import rison from 'rison-node';
//import { router } from '../router'
// import { useRouter } from 'vue-router'
Expand All @@ -698,6 +700,12 @@ import { useTheme } from 'vuetify'
// });
export default {
mounted() {
this.setVariablesFromHash();
//required workaround
this.step++;
this.step--;
},
created() {
window.addEventListener("resize", this.setMobile());
this.setMobile();
Expand All @@ -716,7 +724,7 @@ export default {
this.step2AdditionalDetails = "I have configured SAML authentication according to the documentation. I use Azure IDP.";
this.step3DocumentationLink = "https://grafana.com/docs/grafana/latest/auth/saml/";
}
this.setVariablesFromHash();
//this.setVariablesFromHash();
},
data: () => ({
step: 1,
Expand All @@ -730,7 +738,7 @@ export default {
step1Installation: null,
step1Os: null,
step1DeploymentDetails: "",
step1DeploymentDetailsDescription: "Please provide more details about deployment",
step1DeploymentDetailsDescription: "Please provide more details about deployment. ",
step2WhatHappened: "",
step2WhatsExpected: "",
step2HowReproduce: "",
Expand All @@ -748,16 +756,19 @@ export default {
inputVariables: ['step', 'step1Version', 'step1Type', 'step1Cloud', 'step1CloudProvider', 'step1Installation', 'step1Os', 'step1DeploymentDetails', 'step2WhatHappened', 'step2WhatsExpected', 'step2HowReproduce', 'step2AdditionalDetails', 'step3DocumentationLink', 'step4Title', 'step4Category', 'step4SearchQuery', 'step4Tags'],
}),
watch : {
// $route() {
// this.setVariablesFromHash()
// },
$route() {
this.setVariablesFromHash()
//required workaround
this.step++;
this.step--;
},
step() {
if (this.step == 5) {
this.askGrotForSummary();
}
this.setHash();
},
installation() {
step1Installation() {
if (this.step1Installation.toLowerCase().includes('simple')) {
this.step1DeploymentDetailsDescription = "Please provide command how did you started simple Grafana container.";
}
Expand Down Expand Up @@ -787,31 +798,31 @@ export default {
},
setHash() {
var hash = ''
var obj = {}
for (var i = 0; i < this.inputVariables.length; i++) {
var variable = this.inputVariables[i]
if (this[variable] != null && this[variable] != "") {
hash = hash + "&" + variable + "=" + encodeURIComponent(this[variable])
obj[variable] = encodeURIComponent(this[variable]);
}
}
window.location.hash = hash.substring(1)
window.location.hash = rison.encode(obj)
},
setVariablesFromHash() {
var hash = window.location.hash.substring(1)
var obj = {}
if (hash != null && hash != "") {
obj = rison.decode(hash);
}
for (var variable in obj) {
this[variable] = decodeURIComponent(obj[variable]);
}
},
createSignature(format) {
if (format=='markdown') {
return '\n\nProblem debugged with [Grafana Debugger](' + window.location.href +')';
}
return '\n\nProblem debugged with Grafana Debugger: ' + window.location.href;
},
setVariablesFromHash() {
var hash = window.location.hash.substring(1)
var variables = hash.split("&")
for (var i = 0; i < variables.length; i++) {
var variable = variables[i]
var parts = variable.split("=")
if (parts.length == 2) {
this[parts[0]] = decodeURIComponent(parts[1])
}
}
},
sendToGrot() {
if (this.msg == null || this.msg == "") {
return
Expand Down

0 comments on commit 7a18532

Please sign in to comment.