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

Read Grafana address from backend #107

Open
chickenlj opened this issue Dec 12, 2023 · 1 comment
Open

Read Grafana address from backend #107

chickenlj opened this issue Dec 12, 2023 · 1 comment
Labels
console/backend Console backend type

Comments

@chickenlj
Copy link
Contributor

By requesting /metrics/metadata, we can get the backend Grafana service address and then set it as the Iframe url.

The front page is currently ServiceMetrics and should be something like:

<template>
  <v-container grid-list-xl fluid>
    <v-layout row wrap>
      <v-flex>
        <iframe src="http:metadata.grafanaAdress/dashboard-solo/new?utm_source=grafana_gettingstarted&orgId=1&from=1684139950126&to=1684161550126&panelId=1" width="1350" height="700" frameborder="0"></iframe>
      </v-flex>
    </v-layout>
  </v-container>
</template>

<script>
 import Material from 'vuetify/es5/util/colors'

export default {

  name: 'ServiceMetrics'
   components: {
     Breadcrumb,
     Search
   },
   data () {
     return {
       breads: [
         {
           text: 'metrics',
           href: ''
         }
       ],
       metadata: [],
     }
   },
   methods: {
     getMetadata () {
       this.$axios.get('/metrics/metadata').then(response => {
         console.log(response)
       })
     },
   },
   mounted: function () {
      this.getMetadata();
   }
}
</script>

<style scoped>
  .echarts {
    width: 105%;
    height: 68px;
  }

</style>
@chickenlj
Copy link
Contributor Author

chickenlj commented Dec 12, 2023

It could be either an embedded IFrame or open a new tab

image

@mfordjody mfordjody added the console/backend Console backend type label Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console/backend Console backend type
Projects
None yet
Development

No branches or pull requests

2 participants