forked from cerc-io/snowballtools-base
Fix deployments visit URL and date filter (#78)
* Add method to update multiple deployments in single query * Fix deployments URL visit and date filter * Clean fixtures data * Update fixtures data --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"id": 1,
|
||||
"projectid": 1,
|
||||
"name": "randomurl.snowballtools.xyz",
|
||||
"name": "example.snowballtools.xyz",
|
||||
"status": "live",
|
||||
"record": null,
|
||||
"isRedirectedto": false
|
||||
@@ -10,7 +10,7 @@
|
||||
{
|
||||
"id": 2,
|
||||
"projectid": 1,
|
||||
"name": "saugatt.com",
|
||||
"name": "example.org",
|
||||
"status": "pending",
|
||||
"record": {
|
||||
"type": "A",
|
||||
@@ -22,7 +22,7 @@
|
||||
{
|
||||
"id": 3,
|
||||
"projectid": 1,
|
||||
"name": "www.saugatt.com",
|
||||
"name": "www.example.org",
|
||||
"status": "pending",
|
||||
"record": {
|
||||
"type": "CNAME",
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "Saugat Yadav",
|
||||
"email": "saugaty@airfoil.studio",
|
||||
"id": 1
|
||||
},
|
||||
{
|
||||
"name": "Gideon Low",
|
||||
"email": "gideonl@airfoil.studio",
|
||||
"id": 2
|
||||
},
|
||||
{
|
||||
"name": "Sushan Yadav",
|
||||
"email": "sushany@airfoil.studio",
|
||||
"id": 3
|
||||
}
|
||||
]
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
"[20:50:03.502] Running build in Washington, D.C., USA (East) – iad1",
|
||||
"[20:50:03.641] Cloning github.com/saugatyadav11/nextjs2 (Branch: main, Commit: 4a5f47f)",
|
||||
"[20:50:03.641] Cloning github.com/cerc-io/nextjs2 (Branch: main, Commit: 4a5f47f)",
|
||||
"[20:50:04.004] Previous build cache not available",
|
||||
"[20:50:04.118] Cloning completed: 480.574ms",
|
||||
"[20:50:04.382] Running 'vercel build'",
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"icon": "^",
|
||||
"name": "iglootools",
|
||||
"title": "Iglootools",
|
||||
"domain": null,
|
||||
"organization": "Airfoil",
|
||||
"url": "iglootools.co",
|
||||
"createdAt": "2023-12-07T04:20:00",
|
||||
"createdBy": "Alice",
|
||||
"deployment": "iglootools.snowballtools.co",
|
||||
"source": "feature/add-remote-control",
|
||||
"latestCommit": {
|
||||
"message": "subscription added",
|
||||
"createdAt": "2023-12-11T04:20:00",
|
||||
"branch": "main"
|
||||
},
|
||||
"repositoryId": 1,
|
||||
"members": [
|
||||
{
|
||||
"id": 1,
|
||||
"permissions": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"permissions": ["view", "edit"]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"permissions": ["view"]
|
||||
}
|
||||
],
|
||||
"ownerId": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"icon": "^",
|
||||
"name": "snowball-starter-kit",
|
||||
"title": "Snowball Starter Kit",
|
||||
"domain": null,
|
||||
"organization": "Snowball",
|
||||
"url": "starterkit.snowballtools.com",
|
||||
"createdAt": "2023-12-04T04:20:00",
|
||||
"createdBy": "Bob",
|
||||
"deployment": "deploy.snowballtools.com",
|
||||
"source": "prod/add-docker-compose",
|
||||
"latestCommit": {
|
||||
"message": "component updates",
|
||||
"createdAt": "2023-12-11T04:20:00",
|
||||
"branch": "staging"
|
||||
},
|
||||
"repositoryId": 1,
|
||||
"members": [
|
||||
{
|
||||
"id": 2,
|
||||
"permissions": []
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"permissions": ["view"]
|
||||
}
|
||||
],
|
||||
"ownerId": 2
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"icon": "^",
|
||||
"name": "web3-android",
|
||||
"title": "Web3 Android",
|
||||
"domain": null,
|
||||
"organization": "Personal",
|
||||
"url": "web3fordroids.com",
|
||||
"createdAt": "2023-12-01T04:20:00",
|
||||
"createdBy": "Charlie",
|
||||
"deployment": "deploy.web3fordroids.com",
|
||||
"source": "dev/style-page",
|
||||
"latestCommit": {
|
||||
"message": "No repo connected",
|
||||
"createdAt": "2023-12-01T04:20:00",
|
||||
"branch": "main"
|
||||
},
|
||||
"repositoryId": 1,
|
||||
"members": [
|
||||
{
|
||||
"id": 1,
|
||||
"permissions": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"permissions": ["view", "edit"]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"permissions": ["view"]
|
||||
}
|
||||
],
|
||||
"ownerId": 1
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"icon": "^",
|
||||
"name": "passkeys-demo",
|
||||
"title": "Passkeys Demo",
|
||||
"domain": null,
|
||||
"organization": "Airfoil",
|
||||
"url": "passkeys.iglootools.xyz",
|
||||
"createdAt": "2023-12-01T04:20:00",
|
||||
"createdBy": "David",
|
||||
"deployment": "demo.passkeys.xyz",
|
||||
"source": "dev/style-page",
|
||||
"latestCommit": {
|
||||
"message": "hello world",
|
||||
"createdAt": "2023-12-01T04:20:00",
|
||||
"branch": "main"
|
||||
},
|
||||
"repositoryId": 1,
|
||||
"members": [
|
||||
{
|
||||
"id": 1,
|
||||
"permissions": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"permissions": ["view", "edit"]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"permissions": ["view"]
|
||||
}
|
||||
],
|
||||
"ownerId": 1
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"icon": "^",
|
||||
"name": "iglootools",
|
||||
"title": "Iglootools",
|
||||
"domain": null,
|
||||
"organization": "Airfoil",
|
||||
"url": "iglootools.xyz",
|
||||
"createdAt": "2023-12-11T04:20:00",
|
||||
"createdBy": "Erin",
|
||||
"deployment": "staging.snowballtools.com",
|
||||
"source": "prod/fix-error",
|
||||
"latestCommit": {
|
||||
"message": "404 added",
|
||||
"createdAt": "2023-12-09T04:20:00",
|
||||
"branch": "main"
|
||||
},
|
||||
"repositoryId": 1,
|
||||
"members": [
|
||||
{
|
||||
"id": 3,
|
||||
"permissions": []
|
||||
}
|
||||
],
|
||||
"ownerId": 3
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"icon": "^",
|
||||
"name": "iglootools",
|
||||
"title": "Iglootools",
|
||||
"domain": null,
|
||||
"organization": "Airfoil",
|
||||
"url": "iglootools.xyz",
|
||||
"createdAt": "2023-12-11T04:20:00",
|
||||
"createdBy": "Frank",
|
||||
"deployment": "iglootools.snowballtools.com",
|
||||
"source": "prod/fix-error",
|
||||
"latestCommit": {
|
||||
"message": "design system integrated",
|
||||
"createdAt": "2023-12-09T04:20:00",
|
||||
"branch": "prod"
|
||||
},
|
||||
"repositoryId": 1,
|
||||
"members": [
|
||||
{
|
||||
"id": 2,
|
||||
"permissions": []
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"permissions": ["view"]
|
||||
}
|
||||
],
|
||||
"ownerId": 2
|
||||
}
|
||||
]
|
||||
+1
-5
@@ -122,11 +122,7 @@ const DeploymentDetailsCard = ({
|
||||
<button className="self-start">...</button>
|
||||
</MenuHandler>
|
||||
<MenuList>
|
||||
<a
|
||||
href={'https://' + deployment.url}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<a href={deployment.url} target="_blank" rel="noreferrer">
|
||||
<MenuItem disabled={!Boolean(deployment.url)}>^ Visit</MenuItem>
|
||||
</a>
|
||||
<MenuItem
|
||||
|
||||
@@ -66,8 +66,10 @@ const DeploymentsTabPanel = () => {
|
||||
|
||||
const dateMatch =
|
||||
!filterValue.updateAtRange ||
|
||||
(new Date(deployment.updatedAt) >= filterValue.updateAtRange!.from! &&
|
||||
new Date(deployment.updatedAt) <= filterValue.updateAtRange!.to!);
|
||||
(new Date(Number(deployment.createdAt)) >=
|
||||
filterValue.updateAtRange!.from! &&
|
||||
new Date(Number(deployment.createdAt)) <=
|
||||
filterValue.updateAtRange!.to!);
|
||||
|
||||
return branchMatch && statusMatch && dateMatch;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user