Skip to content

Commit

Permalink
add creation_time field
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Jun 10, 2024
1 parent 1365940 commit f2ee558
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dqpu-contract/src/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class DQPU {

const j: Job = {
id: this.latest_jid.toString(),
timestamp: near.blockTimestamp(),
creation_time: near.blockTimestamp(),

owner_id: near.predecessorAccountId(),
reward_amount: reward,
Expand Down
2 changes: 1 addition & 1 deletion dqpu-contract/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type JobStatus = 'pending-validation' | 'waiting' | 'validating-result' |

export class Job {
id: string;
timestamp: bigint;
creation_time: bigint;

owner_id: AccountId;
reward_amount: bigint;
Expand Down
5 changes: 5 additions & 0 deletions dqpu-frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@
:items-length="n_jobs" :headers="table_headers" :loading="loading"
@update:options="loadJobs">

<template v-slot:item.creation_time="{ item }">
{{new Date(item.creation_time).toLocaleDateString()}}
</template>


<template v-slot:item.reward_amount="{ item }">
{{(item.reward_amount/1000000000000000000000000).toFixed(4)}}
</template>
Expand Down
1 change: 1 addition & 0 deletions dqpu-frontend/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const app = Vue.createApp({
table_headers: [
{ key: "id", title: "#" },
{ key: "status", title: "Status" },
{ key: "creation_time", title: "Time" },
{ key: "qubits", title: "Qubits" },
{ key: "depth", title: "Depth" },
{ key: "shots", title: "Shots" },
Expand Down

0 comments on commit f2ee558

Please sign in to comment.