Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
501 changes: 501 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 32 additions & 6 deletions packages/site/components/section-roadmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@

<div class="roadmap-sections">
<div
v-for="(section, i) in sections"
v-for="(month, i) in roadmap"
:key="`roadmap-section-${i}`"
class="section">

<div class="section-heading">
<div class="text">
{{ section.heading }}
{{ moment(month.eta).format('MMMM YYYY') }}
</div>
</div>

<div class="section-milestones">

<div class="description">
{{ section.description }}
<div v-if="month.description" class="description">
{{ month.description }}
</div>

<div class="milestones">
<div
v-for="item in section.milestones"
v-for="item in month.milestones"
:key="item"
class="milestone">
{{ item }}
{{ item.title }}
</div>
</div>

Expand All @@ -43,14 +43,40 @@
</template>

<script setup>
// ===================================================================== Imports
import { storeToRefs } from 'pinia';
import { useGeneralStore } from '../stores/general.js'
import moment from 'moment'

// ======================================================================= Props
const props = defineProps({
block: {
type: Object,
required: true
}
})

// ======================================================================== Data
const generalStore = useGeneralStore()
const { siteContent } = storeToRefs(generalStore)

// ==================================================================== Computed
const sections = computed(() => props.block.sections)
const roadmap = computed(() => {
const items = [].concat(sections.value)
if (siteContent.value?.roadmap) {
const keys = Object.keys(siteContent.value.roadmap)
keys.forEach((key) => {
const milestones = siteContent.value.roadmap[key]
const month = sections.value.find(section => section.eta === key) || { milestones: [] }
items.push({ eta: key, milestones: milestones.concat(month.milestones) })
})
}
return items
.sort((a, b) => moment(a.eta).valueOf() - moment(b.eta).valueOf())
.filter((month) => moment(month.eta).isBefore(moment().add(1, 'years')))
})

</script>

<style lang="scss" scoped>
Expand Down
31 changes: 17 additions & 14 deletions packages/site/data/pages/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -537,34 +537,37 @@
"sections": [
{
"heading": "March 2023",
"eta": "2023-03",
"description": "The pilot launch comprises of the following functionality",
"milestones": [
"Pulling CIDs from a known location for each storage client.",
"Hard coded tenant policy based on info collected directly from each storage client.",
"Broker API that supports CID selection per client for SPs.",
"Address provisioning on behalf of client (riba) (implies work for clients to get DataCap).",
"Support for remote signing of deal proposal messages from client that will own their address private key.",
"SP Selection logic based on up-front KYC only (per CID eligibility based on replication policy set by storage client)."
{ "title": "Pulling CIDs from a known location for each storage client." },
{ "title": "Hard coded tenant policy based on info collected directly from each storage client." },
{ "title": "Broker API that supports CID selection per client for SPs." },
{ "title": "Address provisioning on behalf of client (riba) (implies work for clients to get DataCap)." },
{ "title": "Support for remote signing of deal proposal messages from client that will own their address private key." },
{ "title": "SP Selection logic based on up-front KYC only (per CID eligibility based on replication policy set by storage client)." }
]
},
{
"heading": "June 2023",
"eta": "2023-06",
"description": "Storage clients participating in the pilot",
"milestones": [
"Spade tenant tracking.",
"The first tenant to go live will be DAGHouse (web3.storage and nft.storage).",
"Broker API thaInternet Archive will begin testing soon after initial launch, with additional time baked in for Spade to stabilize and for testing. More details here.t supports CID selection per client for SPs."
{ "title": "Spade tenant tracking." },
{ "title": "The first tenant to go live will be DAGHouse (web3.storage and nft.storage)." },
{ "title": "Broker API thaInternet Archive will begin testing soon after initial launch, with additional time baked in for Spade to stabilize and for testing. More details here.t supports CID selection per client for SPs." }
]
},
{
"heading": "July 2023",
"eta": "2023-07",
"description": "Includes everything required to support the above stories, with additional development effort",
"milestones": [
"Tenant service: supporting policy setting and management for clients, offer hosting intermediary datastore for CIDs to be onboarded, view into onboarded data",
"SP KYC service: focus on SP UX - tenant discovery and signup, measured QoS tracking",
"ValidationBot: support for HTTP retrievals, integrated into point-in-time SP eligibility (i.e., moving average of retrieval success rate as a metric of QoS that suspends an SPs eligibility temporarily)",
"Key escrow service: more robust support for client address management.",
"<TBD>"
{ "title": "Tenant service: supporting policy setting and management for clients, offer hosting intermediary datastore for CIDs to be onboarded, view into onboarded data" },
{ "title": "SP KYC service: focus on SP UX - tenant discovery and signup, measured QoS tracking" },
{ "title": "ValidationBot: support for HTTP retrievals, integrated into point-in-time SP eligibility (i.e., moving average of retrieval success rate as a metric of QoS that suspends an SPs eligibility temporarily)" },
{ "title": "Key escrow service: more robust support for client address management." },
{ "title": "<TBD>" }
]
}
]
Expand Down
1 change: 1 addition & 0 deletions packages/site/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default defineNuxtConfig({
siteUrl: env === 'development' ? `${baseUrls[env]}:${frontendPort}` : baseUrls[env],
backendUrl: env === 'development' ? `${baseUrls[env]}:${backendPort}` : `${baseUrls[env]}/api`,
serverFlag: env,
githubAccessToken: process.env.GITHUB__PERSONAL_ACCESS_TOKEN__DATA_PROGRAMS,
seo: {
siteName: ''
}
Expand Down
2 changes: 2 additions & 0 deletions packages/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
},
"dependencies": {
"@pinia/nuxt": "^0.5.1",
"moment": "^2.30.1",
"octokit": "^3.1.2",
"pinia": "^2.0.35",
"svg-path-parser": "^1.1.0"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/site/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ const { siteContent } = storeToRefs(generalStore)
// ==================================================================== Watchers
watch(data, async (val) => {
const indexData = val.find(item => item._file === 'data/pages/index.json')
const config = useRuntimeConfig()
await generalStore.getBaseData('general')
await generalStore.getBaseData({ key: 'index', data: indexData })
await generalStore.getRoadmapItems({ token: config.public.githubAccessToken })
}, { immediate: true })

// ==================================================================== Computed
Expand Down
43 changes: 42 additions & 1 deletion packages/site/stores/general.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// ///////////////////////////////////////////////////////////////////// Imports
// -----------------------------------------------------------------------------
import { ref } from '#imports'
import { Octokit } from "@octokit/core";
import NavigationData from '@/data/navigation.json'
import FooterData from '@/data/footer.json'
import moment from 'moment'

// /////////////////////////////////////////////////////////////////////// State
// -----------------------------------------------------------------------------
Expand Down Expand Up @@ -43,6 +45,44 @@ const setNavigationOpen = () => {
navigationOpen.value = !navigationOpen.value
}

// ///////////////////////////////////////////////////////////// getRoadmapItems
const getRoadmapItems = async (incoming) => {
try {
const octokit = new Octokit({ auth: incoming.token })
const roadmap = await octokit.request('GET /repos/data-preservation-programs/spade/issues/{19}', {
owner: 'data-preservation-programs',
repo: 'spade',
issue_number: '19',
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
})
if (roadmap?.data?.length) {
const months = {}
roadmap.data.forEach((item) => {
const parsed = item.body?.match(/ETA:\s[0-9]{4}-[0-9]{2}-[0-9]{2}/gm)
if (parsed?.length) {
const eta = parsed[0].substring(5)
const key = eta.substring(0, 7)
item.eta = eta
if (!months[key]) {
months[key] = [item]
} else {
months[key].push(item)
}
}
})
Object.keys(months).forEach((key) => {
months[key].sort((a, b) => moment(a.eta).valueOf() - moment(b.eta).valueOf())
})
siteContent.value.roadmap = months
}
} catch (e) {
console.log('================================= [function: getRoadmapItems]')
console.log(e)
}
}

// ////////////////////////////////////////////////////////////////////// Export
// -----------------------------------------------------------------------------
export const useGeneralStore = defineStore('general', () => ({
Expand All @@ -55,5 +95,6 @@ export const useGeneralStore = defineStore('general', () => ({
clearStore,
getBaseData,
setTheme,
setNavigationOpen
setNavigationOpen,
getRoadmapItems
}))
2 changes: 2 additions & 0 deletions packages/zero-docs/pages/[language]/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ const generatePageContent = () => {
}
}
})
console.log(array)
pageContent.value = array
}

Expand Down Expand Up @@ -261,6 +262,7 @@ const detectPageScrolledToEdgesOfViewport = () => {
const getPreviewComponentName = path => {
const componentList = ctx.appContext.components
const previewComponentName = 'Preview' + useToPascalCase(path.replace('/docs/', '').replace('/', '-'))
console.log(previewComponentName)
const previewExists = componentList.hasOwnProperty(previewComponentName)
if (previewExists) { return previewComponentName }
return false
Expand Down