From 04d153c04500d919abacdf626521e3839daeb7e1 Mon Sep 17 00:00:00 2001 From: chriswebb09 Date: Tue, 9 Jan 2024 09:17:26 -0500 Subject: [PATCH 1/8] update with react memo --- .../browserview/static/js/account/account.js | 17 ++++- .../static/js/account/account_components.js | 5 +- DirectReport/browserview/static/js/index.js | 6 +- .../browserview/static/js/main_components.js | 22 ++++++ .../team_member.js} | 0 .../team_report.js} | 67 +++++++++++++++++-- .../team_report_components.js} | 47 +++++++------ .../browserview/templates/account.html | 5 +- .../templates/components/_navigation.html | 26 +++---- .../browserview/templates/detail.html | 2 +- .../browserview/templates/edit_account.html | 2 +- DirectReport/browserview/templates/index.html | 2 +- DirectReport/browserview/templates/list.html | 2 +- .../browserview/templates/team/team.html | 2 +- .../templates/team/teamreport.html | 7 +- 15 files changed, 152 insertions(+), 60 deletions(-) create mode 100644 DirectReport/browserview/static/js/main_components.js rename DirectReport/browserview/static/js/{teamreport/teammember.js => team_report/team_member.js} (100%) rename DirectReport/browserview/static/js/{teamreport/teamreport.js => team_report/team_report.js} (70%) rename DirectReport/browserview/static/js/{teamreport/teamreport_components.js => team_report/team_report_components.js} (93%) diff --git a/DirectReport/browserview/static/js/account/account.js b/DirectReport/browserview/static/js/account/account.js index 002ddbd7..3e3ec0df 100644 --- a/DirectReport/browserview/static/js/account/account.js +++ b/DirectReport/browserview/static/js/account/account.js @@ -8,6 +8,7 @@ const Account = () => { const [error, setError] = useState(null); useEffect(() => { + document.getElementById('AuthSpinnerUI').classList.toggle("hidden"); fetch('/api/account_data') .then((response) => { if (!response.ok) { @@ -23,17 +24,27 @@ const Account = () => { setError(null); }) .catch((err) => { - setUserData(null) - setReportData(null) + setUserData(null); + setReportData(null); + setError(err.message); }) .finally(() => { setLoading(false); + document.getElementById('AuthSpinnerUI').classList.toggle("hidden"); }); }, []); if (loading) { return ( -
{`There is a problem fetching the post data - ${error}`}
+
+
+ +
+
+
{`There is a problem fetching the post data - ${error}`}
+
+
+
) } else { return ( diff --git a/DirectReport/browserview/static/js/account/account_components.js b/DirectReport/browserview/static/js/account/account_components.js index 5ccdae25..093efdc9 100644 --- a/DirectReport/browserview/static/js/account/account_components.js +++ b/DirectReport/browserview/static/js/account/account_components.js @@ -70,8 +70,6 @@ const AccountUserInfo = (userData, reportData) => { - -
) -} \ No newline at end of file +} + diff --git a/DirectReport/browserview/static/js/index.js b/DirectReport/browserview/static/js/index.js index 8464198f..4071cb18 100644 --- a/DirectReport/browserview/static/js/index.js +++ b/DirectReport/browserview/static/js/index.js @@ -10,18 +10,18 @@ class Home extends React.Component { React.createElement( 'div', { - className: "pt-20 pb-20 flex h-50", + className: "pt-5 pb-10 flex h-30", style: {background: "linear-gradient(90deg, #667eea 0%, #764ba2 100%)"} }, React.createElement( "div", { - className: "container mx-auto px-6" + className: "container mx-10 px-10 py-10" }, React.createElement( "h2", { - className: "text-3xl font-bold mb-3 text-white" + className: "text-2xl font-bold mb-3 text-white" }, "DirectReport." ), diff --git a/DirectReport/browserview/static/js/main_components.js b/DirectReport/browserview/static/js/main_components.js new file mode 100644 index 00000000..60011853 --- /dev/null +++ b/DirectReport/browserview/static/js/main_components.js @@ -0,0 +1,22 @@ +const { useState, useEffect } = React; + +const AuthSpinnerUI = () => { + return ( +
+
+
+
+ + Loading... +
+
+
+
+ ) +} \ No newline at end of file diff --git a/DirectReport/browserview/static/js/teamreport/teammember.js b/DirectReport/browserview/static/js/team_report/team_member.js similarity index 100% rename from DirectReport/browserview/static/js/teamreport/teammember.js rename to DirectReport/browserview/static/js/team_report/team_member.js diff --git a/DirectReport/browserview/static/js/teamreport/teamreport.js b/DirectReport/browserview/static/js/team_report/team_report.js similarity index 70% rename from DirectReport/browserview/static/js/teamreport/teamreport.js rename to DirectReport/browserview/static/js/team_report/team_report.js index c7e4ee18..6f8364c6 100644 --- a/DirectReport/browserview/static/js/teamreport/teamreport.js +++ b/DirectReport/browserview/static/js/team_report/team_report.js @@ -1,6 +1,59 @@ 'use strict'; -const {useState, useCallback, useEffect} = React; +const {useState, useCallback, useEffect, memo} = React; + +const ShowTeamReport = () => { + // const [userData, setUserData] = useState({}); + // const [reportData, setReportData] = useState([]); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + + useEffect(() => { + // document.getElementById('AuthSpinnerUI').classList.toggle("hidden"); + fetch('/api/account_data') + .then((response) => { + if (!response.ok) { + throw new Error( + `This is an HTTP error: The status is ${response.status}` + ); + } + return response.json(); + }) + .then((responseData) => { + // setUserData(responseData["user"]); + // setReportData(responseData["reports"]); + setError(null); + }) + .catch((err) => { + // setUserData(null); + // setReportData(null); + setError(err.message); + }) + .finally(() => { + setLoading(false); + // document.getElementById('AuthSpinnerUI').classList.toggle("hidden"); + }); + }, []); + + if (loading) { + return ( +
+
+ +
+
+
{`There is a problem fetching the post data - ${error}`}
+
+
+
+ ) + } else { + return ( + + ) + } + +} class TeamReport extends React.Component { constructor(props) { @@ -146,16 +199,16 @@ class TeamReport extends React.Component { }; render() { - return (

Generate Team Report From Metadata

- {repoPopoverUI()} - {spinnerUI()} + {RepoPopoverUI()} + {SpinnerUI()}
- {EditSummaryElem({"repos": this.state.repos, "commits": this.state.commits}, this.state, this.openRepoPopover)} - {SummarySection(this.state.reportData)} - {TeamSection(this.state.teamData, this.closePopover)} + + {/*{EditSummaryElem({"repos": this.state.repos, "commits": this.state.commits, "state": this.state, "openRepoPopover": this.openRepoPopover})}*/} + +
{this.state.commits.length <= 0 && (
diff --git a/DirectReport/browserview/static/js/teamreport/teamreport_components.js b/DirectReport/browserview/static/js/team_report/team_report_components.js similarity index 93% rename from DirectReport/browserview/static/js/teamreport/teamreport_components.js rename to DirectReport/browserview/static/js/team_report/team_report_components.js index 1e13b710..e252a1d6 100644 --- a/DirectReport/browserview/static/js/teamreport/teamreport_components.js +++ b/DirectReport/browserview/static/js/team_report/team_report_components.js @@ -1,7 +1,7 @@ -const { useState, useEffect } = React; +const { useState, useEffect, memo } = React; // Define a functional component named 'ShowSummary' -const ShowSummary = (report) => { +const ShowSummary = memo(function ShowSum({report}) { return (

{report && report.summary && @@ -11,11 +11,11 @@ const ShowSummary = (report) => { }

); -}; +}) // Define a functional component named 'ShowHighlights' -const ShowHighlights = (report) => { +const ShowHighlights = memo(function ShowHigh({report}) { return (
{/*

{report}

*/} @@ -37,7 +37,7 @@ const ShowHighlights = (report) => {
) -} +}) const ShowTeamList = (team) => { @@ -75,7 +75,7 @@ const openPopover = (e: ChangeEvent, team_member) => { document.getElementById('popoverCommits').innerHTML = "Commits: " + team_member.commits; } -const repoPopoverUI = () => { +const RepoPopoverUI = () => { return (
@@ -90,7 +90,8 @@ const repoPopoverUI = () => { ) } -const SummarySection = (reportData) => { +const SummarySection = (props) => { + let reportData = props["reportData"]; return (
@@ -99,8 +100,8 @@ const SummarySection = (reportData) => { {reportData && reportData["highlights"] !== undefined && (
- {ShowSummary(reportData)} - {ShowHighlights(reportData)} + +
)} @@ -110,14 +111,16 @@ const SummarySection = (reportData) => { ) } -const TeamSection = (teamData, closePopover) => { +const TeamSection = (props) => { + let propData = props.props; + let teamData = propData["teamData"]; + // let closePopover = propData["closePopover"]; return (
-
+

Team

{PopoverUI(closePopover)} - {teamData.length > 0 && ( + {teamData && teamData.length > 0 && (
{ShowTeamList(teamData)} @@ -139,7 +142,10 @@ const GithubEntry = (commit) => { ) } -const GithubButtonElement = (repos, openRepoPopover, state) => { +const GithubButtonElement = (props) => { + let repos = props["repos"]; + let openRepoPopover = props["openRepoPopover"]; + let state = props["state"]; return (
@@ -204,7 +210,7 @@ const GetRepoListElement = (li) => { li.classList.add("border-blueGray-100"); } -const spinnerUI = () => { +const SpinnerUI = () => { return (
@@ -225,8 +231,7 @@ const spinnerUI = () => { ) } -const EditSummaryElem = (props, state, openRepoPopover) => { - let repos = props['repos']; +const EditSummaryElem = memo(function EdSummaryElem({props}) { let commits = props['commits']; return (
@@ -237,11 +242,11 @@ const EditSummaryElem = (props, state, openRepoPopover) => { {commits && commits.length > 0 && ( GithubEntryElement(commits) )} - {GithubButtonElement(repos, openRepoPopover, state)} + {GithubButtonElement(props)}
) -} +}) const closeRepoPopover = () => { document.getElementById('popover-repo-left-purple').classList.toggle("hidden"); @@ -275,14 +280,14 @@ const GraphDiv = () => { ) } -const GraphicsUI = () => { +const GraphicsUI = memo(function Graphics() { return (

Graphic Data

) -} +}) const PopoverUI = (closePopover) => { return ( diff --git a/DirectReport/browserview/templates/account.html b/DirectReport/browserview/templates/account.html index 11e84aa9..1cfa7a37 100644 --- a/DirectReport/browserview/templates/account.html +++ b/DirectReport/browserview/templates/account.html @@ -14,9 +14,10 @@ {% block content %}
-
- +
+ +
{% endblock %} \ No newline at end of file diff --git a/DirectReport/browserview/templates/components/_navigation.html b/DirectReport/browserview/templates/components/_navigation.html index 58565254..11832544 100644 --- a/DirectReport/browserview/templates/components/_navigation.html +++ b/DirectReport/browserview/templates/components/_navigation.html @@ -1,26 +1,26 @@ -
) -} \ No newline at end of file +} + + +const closeRepoPopover = () => { + document.getElementById('popover-repo-left-purple').classList.toggle("hidden"); +} + +const closePopover = () => { + document.getElementById('popover-id-left-purple').classList.toggle("hidden"); +} + +const GraphElement = (title, id, mapcontainer_id) => { + return ( +
+

{title}

+
+
+
+
+
+
+ ) +} + + +const GraphDiv = () => { + return ( +
+ {GraphElement("Number of Pull Requests", "dd", "map-container")} + {GraphElement("Commits Over Times", "dd", "map-container2")} + {GraphElement("Broad Areas of Work", "dd", "map-container3")} +
+ ) +} + +const GraphicsUI = memo(function Graphics() { + return ( +
+

Graphic Data

+ +
+ ) +}) diff --git a/DirectReport/browserview/static/js/team_report/team_report.js b/DirectReport/browserview/static/js/team_report/team_report.js index 6f8364c6..581befd1 100644 --- a/DirectReport/browserview/static/js/team_report/team_report.js +++ b/DirectReport/browserview/static/js/team_report/team_report.js @@ -3,13 +3,10 @@ const {useState, useCallback, useEffect, memo} = React; const ShowTeamReport = () => { - // const [userData, setUserData] = useState({}); - // const [reportData, setReportData] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); useEffect(() => { - // document.getElementById('AuthSpinnerUI').classList.toggle("hidden"); fetch('/api/account_data') .then((response) => { if (!response.ok) { @@ -20,18 +17,13 @@ const ShowTeamReport = () => { return response.json(); }) .then((responseData) => { - // setUserData(responseData["user"]); - // setReportData(responseData["reports"]); setError(null); }) .catch((err) => { - // setUserData(null); - // setReportData(null); setError(err.message); }) .finally(() => { setLoading(false); - // document.getElementById('AuthSpinnerUI').classList.toggle("hidden"); }); }, []); @@ -206,7 +198,6 @@ class TeamReport extends React.Component { {SpinnerUI()}
- {/*{EditSummaryElem({"repos": this.state.repos, "commits": this.state.commits, "state": this.state, "openRepoPopover": this.openRepoPopover})}*/}
diff --git a/DirectReport/browserview/static/js/team_report/team_report_components.js b/DirectReport/browserview/static/js/team_report/team_report_components.js index e252a1d6..a28c7b24 100644 --- a/DirectReport/browserview/static/js/team_report/team_report_components.js +++ b/DirectReport/browserview/static/js/team_report/team_report_components.js @@ -18,7 +18,6 @@ const ShowSummary = memo(function ShowSum({report}) { const ShowHighlights = memo(function ShowHigh({report}) { return (
- {/*

{report}

*/}
    {/* Check if 'highlights' in report is not undefined */} {report["highlights"] !== undefined ? @@ -114,15 +113,13 @@ const SummarySection = (props) => { const TeamSection = (props) => { let propData = props.props; let teamData = propData["teamData"]; - // let closePopover = propData["closePopover"]; return (

    Team

    {PopoverUI(closePopover)} {teamData && teamData.length > 0 && ( -
    +
    {ShowTeamList(teamData)}
    )} @@ -248,47 +245,6 @@ const EditSummaryElem = memo(function EdSummaryElem({props}) { ) }) -const closeRepoPopover = () => { - document.getElementById('popover-repo-left-purple').classList.toggle("hidden"); -} - -const closePopover = () => { - document.getElementById('popover-id-left-purple').classList.toggle("hidden"); -} - -const GraphElement = (title, id, mapcontainer_id) => { - return ( -
    -

    {title}

    -
    -
    -
    -
    -
    -
    - ) -} - - -const GraphDiv = () => { - return ( -
    - {GraphElement("Number of Pull Requests", "dd", "map-container")} - {GraphElement("Commits Over Times", "dd", "map-container2")} - {GraphElement("Broad Areas of Work", "dd", "map-container3")} -
    - ) -} - -const GraphicsUI = memo(function Graphics() { - return ( -
    -

    Graphic Data

    - -
    - ) -}) - const PopoverUI = (closePopover) => { return (
    Date: Tue, 9 Jan 2024 09:29:01 -0500 Subject: [PATCH 3/8] cleanup file --- .../static/js/team_report/team_report_components.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DirectReport/browserview/static/js/team_report/team_report_components.js b/DirectReport/browserview/static/js/team_report/team_report_components.js index a28c7b24..c3bf167d 100644 --- a/DirectReport/browserview/static/js/team_report/team_report_components.js +++ b/DirectReport/browserview/static/js/team_report/team_report_components.js @@ -64,10 +64,10 @@ const openPopover = (e: ChangeEvent, team_member) => { }); document.getElementById('popover-id-left-purple').classList.toggle("hidden"); document.getElementById('popoverTitleContent').innerHTML = team_member.name - var a = document.createElement('a'); + let a = document.createElement('a'); a.setAttribute('href',"https://www.github.com/" + team_member.github_username); a.innerHTML = "Github Profile" - var p = document.createElement("p"); + let p = document.createElement("p"); p.innerHTML = team_member.accomplishments + "

    "; p.appendChild(a); document.getElementById('popoverContent').appendChild(p); From bdd07c1c3f354b36bd7d20ddfa9508de65213e04 Mon Sep 17 00:00:00 2001 From: chriswebb09 Date: Tue, 9 Jan 2024 09:40:02 -0500 Subject: [PATCH 4/8] update --- .../browserview/static/js/main_components.js | 2 +- .../static/js/team_report/team_report.js | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/DirectReport/browserview/static/js/main_components.js b/DirectReport/browserview/static/js/main_components.js index 27499741..0c2a0935 100644 --- a/DirectReport/browserview/static/js/main_components.js +++ b/DirectReport/browserview/static/js/main_components.js @@ -1,4 +1,4 @@ -const { useState, useEffect } = React; +const { useState, useEffect, memo } = React; const AuthSpinnerUI = () => { return ( diff --git a/DirectReport/browserview/static/js/team_report/team_report.js b/DirectReport/browserview/static/js/team_report/team_report.js index 581befd1..ec0347ab 100644 --- a/DirectReport/browserview/static/js/team_report/team_report.js +++ b/DirectReport/browserview/static/js/team_report/team_report.js @@ -2,6 +2,21 @@ const {useState, useCallback, useEffect, memo} = React; + +const ShowSpinner = () => { + return ( +
    +
    + +
    +
    +
    There is a problem fetching the post data
    +
    +
    +
    + ) +} + const ShowTeamReport = () => { const [loading, setLoading] = useState(true); const [error, setError] = useState(null); @@ -29,15 +44,7 @@ const ShowTeamReport = () => { if (loading) { return ( -
    -
    - -
    -
    -
    {`There is a problem fetching the post data - ${error}`}
    -
    -
    -
    + ) } else { return ( From efc2c215d22d4a5bfefad06fc3bddc09084a385b Mon Sep 17 00:00:00 2001 From: chriswebb09 Date: Tue, 9 Jan 2024 09:42:38 -0500 Subject: [PATCH 5/8] cleanup --- .../static/js/team_report/team_report.js | 35 ------------------- .../templates/team/teamreport.html | 2 +- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/DirectReport/browserview/static/js/team_report/team_report.js b/DirectReport/browserview/static/js/team_report/team_report.js index ec0347ab..7e6c9d7e 100644 --- a/DirectReport/browserview/static/js/team_report/team_report.js +++ b/DirectReport/browserview/static/js/team_report/team_report.js @@ -17,42 +17,7 @@ const ShowSpinner = () => { ) } -const ShowTeamReport = () => { - const [loading, setLoading] = useState(true); - const [error, setError] = useState(null); - - useEffect(() => { - fetch('/api/account_data') - .then((response) => { - if (!response.ok) { - throw new Error( - `This is an HTTP error: The status is ${response.status}` - ); - } - return response.json(); - }) - .then((responseData) => { - setError(null); - }) - .catch((err) => { - setError(err.message); - }) - .finally(() => { - setLoading(false); - }); - }, []); - - if (loading) { - return ( - - ) - } else { - return ( - - ) - } -} class TeamReport extends React.Component { constructor(props) { diff --git a/DirectReport/browserview/templates/team/teamreport.html b/DirectReport/browserview/templates/team/teamreport.html index d1104a02..73c59d31 100644 --- a/DirectReport/browserview/templates/team/teamreport.html +++ b/DirectReport/browserview/templates/team/teamreport.html @@ -16,7 +16,7 @@ {% endblock %} \ No newline at end of file From e6fcbfd4bcd8a02a9273d0d6d81b92772bf1c93a Mon Sep 17 00:00:00 2001 From: chriswebb09 Date: Tue, 9 Jan 2024 09:47:27 -0500 Subject: [PATCH 6/8] cleanup --- DirectReport/browserview/dashboard/routes.py | 2 +- DirectReport/browserview/main/routes.py | 19 +---- .../static/js/team_report/team_member.js | 78 ------------------- .../templates/team/team_member.html | 10 --- .../{teamreport.html => team_report.html} | 0 5 files changed, 2 insertions(+), 107 deletions(-) delete mode 100644 DirectReport/browserview/static/js/team_report/team_member.js delete mode 100644 DirectReport/browserview/templates/team/team_member.html rename DirectReport/browserview/templates/team/{teamreport.html => team_report.html} (100%) diff --git a/DirectReport/browserview/dashboard/routes.py b/DirectReport/browserview/dashboard/routes.py index 9df0a977..3e82b311 100644 --- a/DirectReport/browserview/dashboard/routes.py +++ b/DirectReport/browserview/dashboard/routes.py @@ -48,7 +48,7 @@ def dashboard_reports_saved(): @bp.route("/reports/new", methods=['GET', 'POST']) @login_required def dashboard_reports_new(): - return render_template('team/teamreport.html', title='Team Report', data=[]) + return render_template('team/team_report.html.html', title='Team Report', data=[]) @bp.route("/reports/", methods=['GET']) diff --git a/DirectReport/browserview/main/routes.py b/DirectReport/browserview/main/routes.py index 96a94dd5..2c7375e7 100644 --- a/DirectReport/browserview/main/routes.py +++ b/DirectReport/browserview/main/routes.py @@ -5,7 +5,6 @@ from flask_login import current_user from DirectReport.models.user_model import UserModel from DirectReport.browserview.main import bp -from DirectReport.browserview.services.github import GithubClient from DirectReport.datadependencies import appsecrets @@ -61,20 +60,4 @@ def ouath2_callback(): user_info = json_data["user"] user_model = UserModel() user_model.update_github_username(current_user.email, user_info["login"]) - return render_template('team/teamreport.html', title='Team', data=[]) - - -@bp.route("/team", methods=['GET']) -def team(): - return render_template('team/team.html', title='Team', data=[]) - - -@bp.route("/repo/", methods=['GET']) -def repo(reponame=None): - client = GithubClient() - repo = [] - try: - repo = client.get_repo_issues(current_user.github_username, reponame) - except Exception as e: - print(e) - return render_template('team/team.html', title='Team', data=repo) + return render_template('team/team_report.html', title='Team', data=[]) diff --git a/DirectReport/browserview/static/js/team_report/team_member.js b/DirectReport/browserview/static/js/team_report/team_member.js deleted file mode 100644 index 95d74388..00000000 --- a/DirectReport/browserview/static/js/team_report/team_member.js +++ /dev/null @@ -1,78 +0,0 @@ - -const { useState, useEffect } = React; - -const TeamMember = () => { - - const [userData, setUserData] = useState({}); - const [loading, setLoading] = useState(true); - const [error, setError] = useState(null); - - useEffect(() => { - fetch(`/account_data`) - .then((response) => { - if (!response.ok) { - throw new Error( - `This is an HTTP error: The status is ${response.status}` - ); - } - return response.json(); - }) - .then((actualData) => { - setUserData(actualData) - setError(null); - }) - .catch((err) => { - setError(err.message); - setUserData(null) - }) - .finally(() => { - setLoading(false); - }); - }, []); - - if (loading) { - return ( -
    {`There is a problem fetching the data - ${error}`}
    - ) - } else { - return ( -
    -
    -
    -

    Account: {userData.name}

    -

    {userData.userid} content

    -
    -
    -
    -
    -

    Account: {userData.userid}

    - - - -
    -
    -
    -
    -

    Account: {userData.userid}

    -

    {userData.userid} content

    -
    -
    -
    - -
    -
    - ) - } -}; - -const domContainer = document.querySelector('#root'); -ReactDOM.render(, domContainer); \ No newline at end of file diff --git a/DirectReport/browserview/templates/team/team_member.html b/DirectReport/browserview/templates/team/team_member.html deleted file mode 100644 index 8302ebc8..00000000 --- a/DirectReport/browserview/templates/team/team_member.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "base.html" %} - -{% block header %} - {% block title %} {% endblock %} -{% endblock %} - -{% block content %} -
    -
    -{% endblock %} \ No newline at end of file diff --git a/DirectReport/browserview/templates/team/teamreport.html b/DirectReport/browserview/templates/team/team_report.html similarity index 100% rename from DirectReport/browserview/templates/team/teamreport.html rename to DirectReport/browserview/templates/team/team_report.html From fb60a26d614d15923f0d4817d5bc5d367bd67f72 Mon Sep 17 00:00:00 2001 From: chriswebb09 Date: Tue, 9 Jan 2024 09:50:12 -0500 Subject: [PATCH 7/8] cleanup --- DirectReport/browserview/dashboard/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DirectReport/browserview/dashboard/routes.py b/DirectReport/browserview/dashboard/routes.py index 3e82b311..37f6084c 100644 --- a/DirectReport/browserview/dashboard/routes.py +++ b/DirectReport/browserview/dashboard/routes.py @@ -48,7 +48,7 @@ def dashboard_reports_saved(): @bp.route("/reports/new", methods=['GET', 'POST']) @login_required def dashboard_reports_new(): - return render_template('team/team_report.html.html', title='Team Report', data=[]) + return render_template('team/team_report.html', title='Team Report', data=[]) @bp.route("/reports/", methods=['GET']) From 4d2e5bd377efe83d623387b91838b9e219ed82b3 Mon Sep 17 00:00:00 2001 From: chriswebb09 Date: Tue, 9 Jan 2024 09:52:42 -0500 Subject: [PATCH 8/8] cleanup --- .../browserview/static/js/main_components.js | 2 +- .../static/js/team_report/team_report.js | 2 +- .../js/team_report/team_report_components.js | 21 ------------------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/DirectReport/browserview/static/js/main_components.js b/DirectReport/browserview/static/js/main_components.js index 0c2a0935..fabb6108 100644 --- a/DirectReport/browserview/static/js/main_components.js +++ b/DirectReport/browserview/static/js/main_components.js @@ -1,6 +1,6 @@ const { useState, useEffect, memo } = React; -const AuthSpinnerUI = () => { +const SpinnerUI = () => { return (
    diff --git a/DirectReport/browserview/static/js/team_report/team_report.js b/DirectReport/browserview/static/js/team_report/team_report.js index 7e6c9d7e..6a742e62 100644 --- a/DirectReport/browserview/static/js/team_report/team_report.js +++ b/DirectReport/browserview/static/js/team_report/team_report.js @@ -7,7 +7,7 @@ const ShowSpinner = () => { return (
    - +
    There is a problem fetching the post data
    diff --git a/DirectReport/browserview/static/js/team_report/team_report_components.js b/DirectReport/browserview/static/js/team_report/team_report_components.js index c3bf167d..06e7b811 100644 --- a/DirectReport/browserview/static/js/team_report/team_report_components.js +++ b/DirectReport/browserview/static/js/team_report/team_report_components.js @@ -207,27 +207,6 @@ const GetRepoListElement = (li) => { li.classList.add("border-blueGray-100"); } -const SpinnerUI = () => { - return ( -
    -
    -
    -
    - - Loading... -
    -
    -
    -
    - ) -} - const EditSummaryElem = memo(function EdSummaryElem({props}) { let commits = props['commits']; return (