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

upgrade ceramic version #280

Merged
merged 61 commits into from
Dec 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
b9ac876
add pg-boss
hrbustor Oct 9, 2023
e7059d0
add json stringify
hrbustor Oct 9, 2023
a829303
fix logs
hrbustor Oct 9, 2023
9747a82
add logs for runtime definiton
hrbustor Oct 10, 2023
9bfb1dd
add logs
hrbustor Oct 10, 2023
2e852c8
Merge branch 'main' into feat/add-queue-for-subscriber
hrbustor Oct 10, 2023
e0112af
replace jobqueue
hrbustor Oct 10, 2023
1534b30
add job queue for p2p sub
hrbustor Oct 11, 2023
51cf018
update job queue name for testnet and mainnet
hrbustor Oct 11, 2023
24c8346
Merge pull request #266 from us3r-network/feat/add-queue-for-subscriber
hrbustor Oct 11, 2023
04ec180
remove unused logs
hrbustor Oct 11, 2023
b25f24f
udpate queue init
hrbustor Oct 12, 2023
edbba44
add logs
hrbustor Oct 12, 2023
d8a7f81
close cacao
hrbustor Oct 12, 2023
16b9dc6
enable cacao
hrbustor Oct 12, 2023
472b209
close cacao
hrbustor Oct 12, 2023
048fda9
change sub handle to async
hrbustor Oct 12, 2023
777c636
add cacao
hrbustor Oct 12, 2023
42b8db1
close scheduleModule
hrbustor Oct 12, 2023
c54d4bb
modify p2p node to private var
hrbustor Oct 17, 2023
8a4933b
modify p2p node to private var
hrbustor Oct 17, 2023
761642e
init history sync code
hrbustor Oct 20, 2023
60bb254
add the logic code for fatching data from eth
hrbustor Oct 23, 2023
fd6e132
parse chain logs for streams
hrbustor Oct 24, 2023
8bbbef1
save code
hrbustor Oct 24, 2023
27d98c1
update ESM to dynamic import
hrbustor Oct 24, 2023
d1a43ae
fix bugs for fetching cid data from ipfs
hrbustor Oct 24, 2023
be2994f
debug ipfs
hrbustor Oct 25, 2023
fab30b8
debug ipfs
hrbustor Oct 25, 2023
bfc8e49
debug ipfs
hrbustor Oct 25, 2023
cc34b9c
debug ipfs
hrbustor Oct 25, 2023
5391ffa
debug ipfs
hrbustor Oct 25, 2023
f033c7f
debug ipfs
hrbustor Oct 25, 2023
eeec53a
debug ipfs
hrbustor Oct 25, 2023
f70b014
debug ipfs
hrbustor Oct 25, 2023
eaf5e1c
debug ipfs
hrbustor Oct 25, 2023
ea00563
debug ipfs
hrbustor Oct 25, 2023
1912150
debug ipfs
hrbustor Oct 25, 2023
8f5725b
debug ipfs
hrbustor Oct 25, 2023
5e3d97b
debug ipfs
hrbustor Oct 25, 2023
1424e5d
debug ipfs
hrbustor Oct 25, 2023
725dca0
debug ipfs
hrbustor Oct 25, 2023
0671695
debug ipfs
hrbustor Oct 25, 2023
5d1b095
debug ipfs
hrbustor Oct 25, 2023
f564750
debug ipfs
hrbustor Oct 25, 2023
665cce1
complete for history sync
hrbustor Oct 25, 2023
f6976cd
Merge pull request #272 from us3r-network/feat/history-sync
hrbustor Oct 25, 2023
0bc1db1
complete for history sync
hrbustor Oct 25, 2023
0c8758b
Merge pull request #273 from us3r-network/feat/history-sync
hrbustor Oct 25, 2023
58d39f8
async history sync
hrbustor Oct 25, 2023
6add416
add node deployment module
sin-bufan Dec 19, 2023
c169646
Merge pull request #275 from us3r-network/F-nodeAsService-bufan
sin-bufan Dec 20, 2023
43ee8fe
upgrade deps in dashboard
sin-bufan Dec 21, 2023
514f216
fix MenuItem style
sin-bufan Dec 21, 2023
1215be2
delete some comment
sin-bufan Dec 21, 2023
bd7c5f3
Merge pull request #276 from us3r-network/F-upgradeDashBoardDeps-bufan
sin-bufan Dec 21, 2023
d526983
optimize node service ui styles
sin-bufan Dec 21, 2023
c68ef79
Merge pull request #278 from us3r-network/F-nodeAsService-bufan
sin-bufan Dec 21, 2023
452a32b
update node version in cicd
sin-bufan Dec 21, 2023
b057110
update node version in cicd
sin-bufan Dec 21, 2023
e6b46a2
Merge pull request #279 from us3r-network/dashboard-dev
sin-bufan Dec 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dashboard-firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "20"
- run: |
cd packages/client/dashboard
yarn
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "20"
- run: |
cd packages/client/dashboard
yarn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dashboard-firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "20"
- run: |
cd packages/client/dashboard
yarn
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "20"
- run: |
cd packages/client/dashboard
yarn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scan-firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
- run: |
cd packages/client/scan
yarn
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
- run: |
cd packages/client/scan
yarn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scan-firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
- run: |
cd packages/client/scan
yarn
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
- run: |
cd packages/client/scan
yarn
Expand Down
25 changes: 16 additions & 9 deletions packages/client/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@ceramicnetwork/common": "^2.26.0",
"@ceramicnetwork/http-client": "^2.22.0",
"@composedb/devtools": "0.5.0",
"@ceramicnetwork/common": "^3.2.0",
"@ceramicnetwork/http-client": "^3.2.0",
"@composedb/devtools": "0.6.1",
"@graphiql/plugin-explorer": "^0.1.20",
"@monaco-editor/react": "^4.5.1",
"@rjsf/core": "^5.8.2",
Expand All @@ -24,9 +24,10 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/styled-components": "^5.1.26",
"@us3r-network/auth-with-rainbowkit": "^0.1.8",
"@us3r-network/data-model": "^0.2.1",
"@us3r-network/profile": "^0.4.11",
"@us3r-network/auth-with-rainbowkit": "^0.2.1",
"@us3r-network/data-model": "^0.7.0",
"@us3r-network/profile": "^0.7.0",
"axios": "^1.6.2",
"camelcase": "^7.0.1",
"dayjs": "^1.11.7",
"ejs": "^3.1.9",
Expand All @@ -40,16 +41,22 @@
"prism-react-renderer": "^2.0.6",
"prismjs": "^1.29.0",
"react": "^18.2.0",
"react-aria-components": "^1.0.0-alpha.4",
"typescript": "^5.3.3",
"wagmi": "^1.4.10",
"viem": "^1.19.13",
"@rainbow-me/rainbowkit": "^1.3.0",
"react-aria-components": "^1.0.0",
"react-dom": "^18.2.0",
"react-infinite-scroll-component": "^6.1.0",
"react-router-dom": "^6.11.2",
"react-scripts": "5.0.1",
"react-toastify": "^9.1.3",
"socket.io-client": "^4.7.2",
"styled-components": "^5.3.11",
"typescript": "^4.4.2",
"use-url-search-params": "^2.5.1",
"web-vitals": "^2.1.0"
"web-vitals": "^2.1.0",
"xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
63 changes: 34 additions & 29 deletions packages/client/dashboard/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,58 +29,63 @@ import { DappComposite, ModelStream } from './types'
import { ToastContainer } from 'react-toastify'
import 'react-toastify/dist/ReactToastify.min.css'
import DappModelSdk from './container/DappModelSdk'
import CeramicNodes from './container/CeramicNodes'
import CeramicNodeProvider from './context/CeramicNodeCtx'

dayjs.extend(relativeTime)

function Routers() {
function Routers () {
return (
<Routes>
<Route path="/" element={<Layout />}>
<Route path='/' element={<Layout />}>
<Route index element={<MyDapps />} />
<Route path="dapp/create" element={<DappCreate />} />
<Route path="dapp/:appId" element={<DappLayout />}>
<Route path="index" element={<DappHome />} />
<Route path='dapp/create' element={<DappCreate />} />
<Route path='dapp/:appId' element={<DappLayout />}>
<Route path='index' element={<DappHome />} />
<Route path='node' element={<CeramicNodes />} />
<Route element={<ModelEditorLayout />}>
<Route path="model-editor" element={<DappModelEditor />} />
<Route path="model-playground" element={<DappModelPlayground />} />
<Route path="model-sdk" element={<DappModelSdk />} />
<Route path="statistic" element={<DappDataStatistic />} />
<Route path='model-editor' element={<DappModelEditor />} />
<Route path='model-playground' element={<DappModelPlayground />} />
<Route path='model-sdk' element={<DappModelSdk />} />
<Route path='statistic' element={<DappDataStatistic />} />
</Route>
<Route path="info" element={<DappInfo />} />
<Route path="explore" element={<ExploreModel />} />
<Route path="favorite" element={<ExploreModel />} />
<Route path="components" element={<Components />} />
<Route path='info' element={<DappInfo />} />
<Route path='explore' element={<ExploreModel />} />
<Route path='favorite' element={<ExploreModel />} />
<Route path='components' element={<Components />} />
</Route>
</Route>
<Route path="*" element={<NoMatch />} />
<Route path='*' element={<NoMatch />} />
</Routes>
)
}

export default function App() {
export default function App () {
return (
<Us3rAuthWithRainbowkitProvider
projectId={WALLET_CONNECT_PROJECT_ID}
appName="S3 Console"
appName='S3 Console'
>
<ProfileStateProvider ceramicHost={CERAMIC_TESTNET_HOST}>
<CeramicProvider>
<Routers />
<CeramicNodeProvider>
<Routers />
</CeramicNodeProvider>
</CeramicProvider>
</ProfileStateProvider>
</Us3rAuthWithRainbowkitProvider>
)
}

function Layout() {
function Layout () {
return (
<div>
<Header />
<AppContainer>
<Outlet />
</AppContainer>
<ToastContainer
position="top-right"
position='top-right'
autoClose={3000}
hideProgressBar={false}
newestOnTop={false}
Expand All @@ -89,13 +94,13 @@ function Layout() {
pauseOnFocusLoss
draggable
pauseOnHover
theme="dark"
theme='dark'
/>
</div>
)
}

function DappLayout() {
function DappLayout () {
const { loadingDApps, setCurrAppId } = useAppCtx()
const { appId } = useParams()

Expand All @@ -105,16 +110,16 @@ function DappLayout() {

if (!appId || loadingDApps) {
return (
<main className="container">
<div className="login-first">
<img src="/loading.gif" alt="" />
<main className='container'>
<div className='login-first'>
<img src='/loading.gif' alt='' />
</div>
</main>
)
}

return (
<main className="container">
<main className='container'>
<Nav appId={appId} />
<div>
<Outlet />
Expand All @@ -123,7 +128,7 @@ function DappLayout() {
)
}

function ModelEditorLayout() {
function ModelEditorLayout () {
const [selectModel, setSelectModel] = useState<ModelStream>()
const [selectComposite, setSelectComposite] = useState<DappComposite>()

Expand All @@ -133,11 +138,11 @@ function ModelEditorLayout() {
<EditorLayoutContainer>
<ModelList
selectModel={selectModel}
setSelectModel={(data) => {
setSelectModel={data => {
setSelectModel(data)
setSelectComposite(undefined)
}}
setSelectComposite={(data) => {
setSelectComposite={data => {
setSelectModel(undefined)
setSelectComposite(data)
}}
Expand All @@ -147,7 +152,7 @@ function ModelEditorLayout() {
<Outlet
context={{
selectModel,
selectComposite,
selectComposite
}}
/>
</EditorLayoutContainer>
Expand Down
95 changes: 95 additions & 0 deletions packages/client/dashboard/src/api/ceramicNode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
* @Author: bufan bufan@hotmail.com
* @Date: 2023-12-15 14:39:12
* @LastEditors: bufan bufan@hotmail.com
* @LastEditTime: 2023-12-15 15:25:53
* @FilePath: /s3/packages/client/dashboard/src/api/ceramicNode.ts
* @Description:
*/

import axios, { AxiosPromise } from 'axios'
import { CERAMIC_NODE_SERVICE_API_URL } from '../constants'
import {
CeramicRequestDto,
CeramicDto,
CeramicNetwork,
} from '../types'

enum ApiRespCode {
SUCCESS = 0,
ERROR = 1,
}

type ApiResp<T> = {
code: ApiRespCode
msg: string
data: T
}

export function getCeramicNode(id: number): AxiosPromise<ApiResp<CeramicDto>> {
return axios({
url: CERAMIC_NODE_SERVICE_API_URL + `/ceramics/${id}`,
method: 'GET',
})
}

export function createCeramicNode(
ceramicNodeParams: CeramicRequestDto,
didSession: string
): AxiosPromise<ApiResp<CeramicDto>> {
return axios({
url: CERAMIC_NODE_SERVICE_API_URL + '/ceramics',
method: 'POST',
headers: {
'did-session': didSession,
},
data: { ...ceramicNodeParams },
})
}

// export function updateCeramicNode(
// id: number,
// dapp: CeramicRequestDto,
// didSession: string
// ): AxiosPromise<ApiResp<CeramicDto>> {
// if (!id) throw new Error('ceramic node id is required')

// return axios({
// url: CERAMIC_NODE_SERVICE_API_URL + '/ceramics',
// method: 'POST',
// headers: {
// 'did-session': didSession,
// },
// data: { ...dapp, id: Number(id) },
// })
// }

export function delCeramicNode(
id: number,
didSession: string
): AxiosPromise<ApiResp<undefined>> {
if (!id) throw new Error('ceramic node id is required')

return axios({
url: CERAMIC_NODE_SERVICE_API_URL + '/ceramics/' + id,
method: 'DELETE',
headers: {
'did-session': didSession,
},
})
}

export function getCeramicNodes(
didSession: string,
network?: CeramicNetwork
): AxiosPromise<ApiResp<CeramicDto[]>> {

return axios({
url: CERAMIC_NODE_SERVICE_API_URL + '/ceramics',
method: 'GET',
headers: {
'did-session': didSession,
},
data: { network },
})
}
Loading