forked from open-source-labs/Quell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request open-source-labs#101 from oslabs-beta/master
merging in v1.0 of extension
- Loading branch information
Showing
93 changed files
with
14,679 additions
and
4,070 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- dev | ||
|
||
jobs: | ||
test: | ||
name: Testing packages against our testing suite. | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
- name: Redis Server in GitHub Actions | ||
uses: supercharge/[email protected] | ||
with: | ||
redis-version: 6 | ||
- name: npm install and test | ||
run: | | ||
cd quell-client | ||
pwd | ||
npm install | ||
npm test | ||
cd ../quell-server | ||
pwd | ||
npm install | ||
npm test | ||
cd ../quell-extension | ||
pwd | ||
npm install | ||
npm test | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
node_modules | ||
.env | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
presets: [ | ||
['@babel/preset-env', {targets: {node: 'current'}}], | ||
'@babel/preset-typescript', "@babel/preset-react" | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* eslint-disable react/prop-types */ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
import React, { useState, useEffect } from 'react'; | ||
import Trend from 'react-trend'; | ||
|
||
const Metrics = (props) => { | ||
const { | ||
fetchTime, // time to fetch request | ||
fetchTimeInt, // array of time values at each point in fetching and caching | ||
} = props; | ||
const avgFetchTime = fetchTimeInt[0] ? (fetchTimeInt.reduce((a:number, b:number) => a+b, 0)/fetchTimeInt.length).toFixed(2) + " ms": " - ms"; | ||
|
||
return ( | ||
<div className="metrics-container"> | ||
<div style={{fontSize:'1.5rem'}}>Metrics:</div> | ||
<div id="speed-metrics"> | ||
<div>Latest query/mutation time:</div> | ||
<div style={{fontSize:'1.75em'}}>{fetchTime ? fetchTime + " ms" :" - ms"}</div> | ||
<div>Average cache time: {avgFetchTime}</div> | ||
</div> | ||
<div id="speed-graph"> | ||
<h3>Speed Graph:</h3> | ||
<Trend | ||
height = {Number(`${window.innerHeight}`)>=250 ? Number(`${window.innerHeight}`)-220 : 30} | ||
// width={Number(window.innerWidth / 5)} | ||
className="trend" | ||
data={fetchTimeInt} | ||
gradient={['#1feaea','#ffd200', '#f72047']} | ||
radius={0.9} | ||
strokeWidth={2.2} | ||
strokeLinecap={'round'} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Metrics; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import React, { useState } from "react"; | ||
import logo from "../images/quell_logos/icon128.png"; | ||
import Header from "../images/headers/QUELL-headers-devtools w lines.png"; | ||
|
||
const Devtool = () => { | ||
const [activeTab, setActiveTab] = useState("client"); | ||
|
||
return ( | ||
<center> | ||
<div id='devtool-header-container'> | ||
<img id='devtool-header' src={Header} width={275}/> | ||
</div> | ||
|
||
<div className='devtool-text'> | ||
<h4>Quell now also features a Chrome Developer Tools extension designed for Quell users. </h4> | ||
<h4>With this extension, users can:</h4> | ||
<br /> | ||
<li>Inspect and monitor the latency of client-side GraphQL/Quell requests</li> | ||
<li>Make and monitor the latency of GraphQL/Quell requests to a specified server endpoint</li> | ||
<li>View server-side cache data and contents, with the ability to manually clear the cache</li> | ||
<li>{`Requires zero-to-minimal configuration and can work independently of Quell's client \nand server libraries`}</li> | ||
<br/> | ||
</div> | ||
|
||
<div className="devtool_demo"> | ||
<div className="navbar"> | ||
<img src={'https://imgur.com/180d29b4-ba3f-4c3b-93cd-ba635f087350'} /> | ||
<button | ||
id='client_button' | ||
onClick={() => setActiveTab("client")} | ||
style={activeTab === "client" ? { backgroundColor: "#444" } : {}} | ||
> | ||
Client | ||
</button> | ||
<button | ||
id='server_button' | ||
onClick={() => setActiveTab("server")} | ||
style={activeTab === "server" ? { backgroundColor: "#444" } : {}} | ||
> | ||
Server | ||
</button> | ||
<button | ||
id='cache_button' | ||
onClick={() => setActiveTab("cache")} | ||
style={activeTab === "cache" ? { backgroundColor: "#444" } : {}} | ||
> | ||
Cache | ||
</button> | ||
<button | ||
id='settings_button' | ||
onClick={() => setActiveTab("settings")} | ||
style={activeTab === "settings" ? { backgroundColor: "#444" } : {}} | ||
> | ||
Settings | ||
</button> | ||
</div> | ||
<div className="gif_container"> | ||
{activeTab === "client" && <img src={'https://i.imgur.com/mdZj4OD.gif'} width={800} />} | ||
{activeTab === "server" && <img src={'https://i.imgur.com/FBlvNhI.gif'} width={800} />} | ||
{activeTab === "cache" && <img src={'https://i.imgur.com/Wj435ZW.gif'} width={800} />} | ||
{activeTab === "settings" && <img src={'https://i.imgur.com/WK5saAJ.gif'} width={800} />} | ||
</div> | ||
</div> | ||
</center> | ||
); | ||
}; | ||
|
||
export default Devtool; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.