Giter Club home page Giter Club logo

Comments (14)

Vadman97 avatar Vadman97 commented on August 25, 2024 1

@ezhil56x see #8579 (comment) for instructions to get started - feel free to work on this issue.

from highlight.

linear avatar linear commented on August 25, 2024

HIG-4662 dashbaord should show default title based on metric being graphed

from highlight.

greptile-apps avatar greptile-apps commented on August 25, 2024

To implement default titles for metrics being graphed, follow these steps:

  1. Update getDefaultMetricConfig in /frontend/src/pages/Dashboards/Metrics.ts:

    • Modify the function to include a default title based on the metric name.
    export const getDefaultMetricConfig = (name: string): DashboardMetricConfig => ({
      name,
      title: `Default Title for ${name}`, // Add this line
      aggregator: MetricAggregator.AVG,
      ...
    });
  2. Modify CreateDashboardModal in /frontend/src/pages/Dashboards/components/CreateDashboardModal/CreateDashboardModal.tsx:

    • Ensure the modal uses the default title when creating a new dashboard.
    const handleCreate = () => {
      const defaultConfig = getDefaultMetricConfig(metricName);
      const newDashboard = {
        title: defaultConfig.title, // Use default title
        ...
      };
      ...
    };
  3. Update DashboardPage in /frontend/src/pages/Dashboards/pages/Dashboard/DashboardPage.tsx:

    • Ensure the dashboard page displays the default title if no custom title is provided.
    const DashboardPage = ({ dashboard }) => {
      const title = dashboard.title || `Default Title for ${dashboard.metricName}`;
      return (
        <h1>{title}</h1>
        ...
      );
    };
  4. Modify GraphingEditor in /frontend/src/pages/Graphing/GraphingEditor.tsx:

    • Ensure the graph editor uses the default title when creating a new graph.
    const handleCreateMetricView = () => {
      const defaultConfig = getDefaultMetricConfig(selectedMetric);
      const newMetricView = {
        title: defaultConfig.title, // Use default title
        ...
      };
      ...
    };

References

/backend/model/model.go
/frontend/src/pages/Graphing/Dashboard.tsx
/frontend/src/pages/Dashboards/Metrics.ts
/frontend/src/pages/Dashboards/components/CreateDashboardModal/CreateDashboardModal.tsx
/frontend/src/pages/Dashboards/pages/Dashboard/DashboardPage.tsx
/frontend/src/pages/Graphing/GraphingEditor.tsx

Ask Greptile

from highlight.

Vadman97 avatar Vadman97 commented on August 25, 2024

/bounty $50

from highlight.

algora-pbc avatar algora-pbc commented on August 25, 2024

💎 $50 bounty • Highlight (YC W23)

Payment will be awarded to the first person to successfully merge a PR meeting all requirements. In the event that multiple PRs are submitted for the issue, we will award payment to the highest quality PR (the one that has cleanest code, best test coverage, most thorough, etc.).

Steps to solve:

  1. Start working: Comment /attempt #8579 with your implementation plan
  2. Submit work: Create a pull request including /claim #8579 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to highlight/highlight!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🔴 @ezhil56x May 17, 2024, 2:19:32 AM WIP
🟢 @rajeshj11 May 17, 2024, 5:51:26 AM #8602

from highlight.

neo773 avatar neo773 commented on August 25, 2024

@Vadman97
What should be the default title?

from highlight.

Vadman97 avatar Vadman97 commented on August 25, 2024

@neo773 updated the description, thanks

from highlight.

ezhil56x avatar ezhil56x commented on August 25, 2024

@Vadman97

I would like to work on this.
Currently for all Metrics the title is Dashboard. But the goal is to update the title with the Metrics name.
For example if the Metrics name is Insights then the title should be Dashboard - Insights.
Is this what you're expecting?

from highlight.

Vadman97 avatar Vadman97 commented on August 25, 2024

@ezhil56x please see the description. the default is currently Untitled metric view but should update based on the function / metric that are being graphed. In the description image example, the title should update to CountDistinct(Identifier)

from highlight.

ezhil56x avatar ezhil56x commented on August 25, 2024

I would like to work on this
Can I get assigned?

from highlight.

ezhil56x avatar ezhil56x commented on August 25, 2024

/attempt #8579

Algora profile Completed bounties Tech Active attempts Options
@ezhil56x 28 bounties from 11 projects
JavaScript, TypeScript,
Java & more
Cancel attempt

from highlight.

rajeshj11 avatar rajeshj11 commented on August 25, 2024

/attempt #8579

Algora profile Completed bounties Tech Active attempts Options
@rajeshj11 1 bounty from 1 project
JavaScript, TypeScript,
HTML
Cancel attempt

from highlight.

algora-pbc avatar algora-pbc commented on August 25, 2024

💡 @rajeshj11 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

from highlight.

algora-pbc avatar algora-pbc commented on August 25, 2024

🎉🎈 @rajeshj11 has been awarded $50! 🎈🎊

from highlight.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.