Skip to content

Commit

Permalink
cgra-bear - GoodData.UI v8.10
Browse files Browse the repository at this point in the history
  • Loading branch information
BugsBunny338 committed Aug 10, 2022
1 parent 5f365b6 commit 3bc3293
Show file tree
Hide file tree
Showing 8 changed files with 3,960 additions and 3,957 deletions.
2 changes: 1 addition & 1 deletion cgra-bear/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.15.0
v16.13.0
20 changes: 10 additions & 10 deletions cgra-bear/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@gooddata/sdk-backend-bear": "^8.9.0",
"@gooddata/sdk-model": "^8.9.0",
"@gooddata/sdk-ui": "^8.9.0",
"@gooddata/sdk-ui-charts": "^8.9.0",
"@gooddata/sdk-ui-dashboard": "^8.9.0",
"@gooddata/sdk-ui-ext": "^8.9.0",
"@gooddata/sdk-ui-filters": "^8.9.0",
"@gooddata/sdk-ui-geo": "^8.9.0",
"@gooddata/sdk-ui-pivot": "^8.9.0",
"@gooddata/sdk-backend-bear": "^8.10.0",
"@gooddata/sdk-model": "^8.10.0",
"@gooddata/sdk-ui": "^8.10.0",
"@gooddata/sdk-ui-charts": "^8.10.0",
"@gooddata/sdk-ui-dashboard": "^8.10.0",
"@gooddata/sdk-ui-ext": "^8.10.0",
"@gooddata/sdk-ui-filters": "^8.10.0",
"@gooddata/sdk-ui-geo": "^8.10.0",
"@gooddata/sdk-ui-pivot": "^8.10.0",
"classnames": "^2.3.1",
"formik": "^2.2.9",
"lodash": "^4.17.15",
Expand Down Expand Up @@ -57,7 +57,7 @@
"@babel/preset-env": "^7.16.5",
"@babel/preset-typescript": "^7.16.5",
"@babel/register": "^7.16.5",
"@gooddata/catalog-export": "^8.9.0",
"@gooddata/catalog-export": "^8.10.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.6",
"babel-plugin-add-module-exports": "^1.0.4",
"cross-env": "^5.2.0",
Expand Down
4 changes: 4 additions & 0 deletions cgra-bear/src/App.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import React from "react";
import { BackendProvider } from "@gooddata/sdk-ui";
import { ThemeProvider } from "@gooddata/sdk-ui-theme-provider";

import AppRouter from "./routes/AppRouter";
import { useAuth } from "./contexts/Auth";
import { WorkspaceListProvider } from "./contexts/WorkspaceList";
import customTheme from "./theme";

function App() {
const { backend } = useAuth();

return (
<BackendProvider backend={backend}>
<WorkspaceListProvider>
{/* <ThemeProvider theme={customTheme}> */}
<AppRouter />
{/* </ThemeProvider> */}
</WorkspaceListProvider>
</BackendProvider>
);
Expand Down
49 changes: 33 additions & 16 deletions cgra-bear/src/md/full.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable */

/* THIS FILE WAS AUTO-GENERATED USING CATALOG EXPORTER; YOU SHOULD NOT EDIT THIS FILE; GENERATE TIME: 2022-06-09T10:57:58.575Z; */
/* THIS FILE WAS AUTO-GENERATED USING CATALOG EXPORTER; YOU SHOULD NOT EDIT THIS FILE; GENERATE TIME: 2022-08-10T13:19:13.378Z; */
// @ts-ignore ignore unused imports here if they happen (e.g. when there is no measure in the workspace)
import { newAttribute, newMeasure, idRef } from "@gooddata/sdk-model";
/**
Expand Down Expand Up @@ -168,6 +168,13 @@ export const PercentTotalSalesFromPreviousMonth = newMeasure(idRef("aaoPOljQfRt1
*/

export const AveragePageViews = newMeasure(idRef("aaSdqzqHdNL8", "measure"));
/**
* Metric Title: Average Page Views (Colored)
* Metric ID: ab9F5vJuqTdZ
* Metric Type: MAQL Metric
*/

export const AveragePageViewsColored = newMeasure(idRef("ab9F5vJuqTdZ", "measure"));
/**
* Metric Title: Average Page Views [computers]
* Metric ID: aaddocAhfjN5
Expand Down Expand Up @@ -4798,6 +4805,26 @@ export const Insights = {
* Insight ID: accpTuREibqZ
*/
PageViewsByCategoryByBrand: "accpTuREibqZ",
/**
* Insight Title: Table (Colored)
* Insight ID: abuF8xDvs20l
*/
TableColored: "abuF8xDvs20l",
/**
* Insight Title: Avg Price by Category
* Insight ID: abdPNHOLcHLk
*/
AvgPriceByCategory: "abdPNHOLcHLk",
/**
* Insight Title: Avg Price by Category — Colored
* Insight ID: aaEPYMhnXmFf
*/
AvgPriceByCategoryColored: "aaEPYMhnXmFf",
/**
* Insight Title: Quantity by Category
* Insight ID: aaLgNq53S6VB
*/
QuantityByCategory: "aaLgNq53S6VB",
};
export const Dashboards = {
/**
Expand Down Expand Up @@ -4825,11 +4852,6 @@ export const Dashboards = {
* Dashboard ID: aagL8MteaYAo
*/
_5Embedding: "aagL8MteaYAo",
/**
* Dashboard Title: Overview
* Dashboard ID: abVw0FT8W9Jz
*/
Overview: "abVw0FT8W9Jz",
/**
* Dashboard Title: Dynamic Measures
* Dashboard ID: aaNEDetXTWPh
Expand All @@ -4840,19 +4862,14 @@ export const Dashboards = {
* Dashboard ID: aagCCFA94QP5
*/
DynamicMeasuresTesting: "aagCCFA94QP5",
/**
* Dashboard Title: Detail View
* Dashboard ID: aejqFk1jN0T5
*/
DetailView: "aejqFk1jN0T5",
/**
* Dashboard Title: Copy of 1. Overview
* Dashboard ID: adcZ7eakBfE4
*/
CopyOf1Overview: "adcZ7eakBfE4",
/**
* Dashboard Title: Recharts Piechart
* Dashboard ID: aa0mnpTS4siw
*/
RechartsPiechart: "aa0mnpTS4siw",
/**
* Dashboard Title: My First Dashboard
* Dashboard ID: abUgFDzQoKGW
*/
MyFirstDashboard: "abUgFDzQoKGW",
};
22 changes: 1 addition & 21 deletions cgra-bear/src/routes/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,7 @@ import CustomBarChart from "../components/CustomBarChart";
const Home = () => {
return (
<Page>
<iframe
title="dashboard"
width="100%"
height="600"
src="https://demos.na.gooddata.com/dashboards/embedded/#/workspace/gf5ar7e02sth33atdbzpabhvbddaqva3/dashboard/aadPCE04gggj?showNavigation=false"
/>
<Dashboard dashboard={"aadPCE04gggj"} />
<Headline primaryMeasure={Md.PageViews} />
<div style={{ height: 400 }}>
<InsightView insight={Md.Insights.PageViewsByCategoryByBrand} />
</div>
<div style={{ height: 400 }}>
<ColumnChart
measures={[Md.PageViews]}
viewBy={Md.ProductCategory}
stackBy={Md.ProductBrand}
/>
</div>
<Execute seriesBy={[Md.PageViews]} slicesBy={[Md.ProductCategory]}>
{CustomBarChart}
</Execute>
<p>Start by editing Home.js…</p>
</Page>
);
};
Expand Down
39 changes: 39 additions & 0 deletions cgra-bear/src/routes/Home2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from "react";
import { ColumnChart, Headline } from "@gooddata/sdk-ui-charts";
import { InsightView } from "@gooddata/sdk-ui-ext";
import { Execute } from "@gooddata/sdk-ui";
import { Dashboard } from "@gooddata/sdk-ui-dashboard";

import Page from "../components/Page";
import * as Md from "../md/full";
import CustomBarChart from "../components/CustomBarChart";

const Home = () => {
return (
<Page>
<iframe
title="dashboard"
width="100%"
height="600"
src="https://demos.na.gooddata.com/dashboards/embedded/#/workspace/gf5ar7e02sth33atdbzpabhvbddaqva3/dashboard/aadPCE04gggj?showNavigation=false"
/>
<Dashboard dashboard={"aadPCE04gggj"} />
<Headline primaryMeasure={Md.PageViews} />
<div style={{ height: 400 }}>
<InsightView insight={Md.Insights.PageViewsByCategoryByBrand} />
</div>
<div style={{ height: 400 }}>
<ColumnChart
measures={[Md.PageViews]}
viewBy={Md.ProductCategory}
stackBy={Md.ProductBrand}
/>
</div>
<Execute seriesBy={[Md.PageViews]} slicesBy={[Md.ProductCategory]}>
{CustomBarChart}
</Execute>
</Page>
);
};

export default Home;
45 changes: 45 additions & 0 deletions cgra-bear/src/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { ITheme } from "@gooddata/sdk-model";

export default {
button: {
borderRadius: "15",
dropShadow: true,
textCapitalization: true,
},
modal: {
borderColor: "#1b4096",
borderRadius: "5",
borderWidth: "2",
dropShadow: false,
outsideBackgroundColor: "#e8cda2",
title: {
color: "#1b4096",
lineColor: "#000",
},
},
palette: {
error: {
base: "#ff2e5f",
},
primary: {
base: "#eba12a",
},
success: {
base: "#13ed4d",
},
warning: {
base: "#ddff19",
},
},
tooltip: {
backgroundColor: "#101050",
color: "#fff",
},
typography: {
font: "url(https://cdn.jsdelivr.net/npm/[email protected]/fonts/Roboto/roboto-regular-webfont.ttf)",
fontBold: "url(https://cdn.jsdelivr.net/npm/[email protected]/fonts/Roboto/roboto-bold-webfont.ttf)",
},
chart: {
backgroundColor: "#eeeeee",
},
};
Loading

0 comments on commit 3bc3293

Please sign in to comment.