Skip to content

fix: post project with blueprint#7449

Merged
klesh merged 10 commits into
mainfrom
post-project-bp
May 13, 2024
Merged

fix: post project with blueprint#7449
klesh merged 10 commits into
mainfrom
post-project-bp

Conversation

@abeizn
Copy link
Copy Markdown
Contributor

@abeizn abeizn commented May 10, 2024

Summary

post projects with blueprint info

Does this close any open issues?

Related to #7427

Screenshots

  1. post projects with blueprint info

[POST] http://localhost:4000/api/projects

curl --request POST \
  --url http://localhost:4000/api/projects \
  --header 'content-type: application/json' \
--data '{
  "name": "p1112",
  "description": "",
  "enable": true,
  "metrics": [
    {
      "pluginName": "dora",
      "pluginOption": "",
      "enable": true
    }
  ]
}'

Result:

{
    "name": "p1112",
    "description": "",
    "createdAt": "2024-05-10T08:44:48.288+08:00",
    "updatedAt": "2024-05-10T08:44:48.288+08:00",
    "_raw_data_params": "",
    "_raw_data_table": "",
    "_raw_data_id": 0,
    "_raw_data_remark": "",
    "metrics": [
        {
            "pluginName": "dora",
            "pluginOption": "",
            "enable": true
        }
    ],
    "blueprint": {
        "name": "p1112-Blueprint",
        "projectName": "p1112",
        "mode": "NORMAL",
        "plan": [
            [
                {
                    "plugin": "org",
                    "subtasks": [
                        "setProjectMapping"
                    ],
                    "options": {
                        "projectMappings": [
                            {
                                "projectName": "p1112",
                                "scopes": null
                            }
                        ]
                    }
                }
            ]
        ],
        "enable": true,
        "cronConfig": "0 0 * * *",
        "isManual": false,
        "beforePlan": null,
        "afterPlan": null,
        "labels": [],
        "connections": [],
        "skipOnFail": false,
        "skipCollectors": false,
        "fullSync": false,
        "timeAfter": "2023-11-09T16:00:00Z",
        "id": 10,
        "createdAt": "2024-05-10T00:44:48.362Z",
        "updatedAt": "2024-05-10T00:44:48.362Z"
    }
}

Comment thread backend/test/helper/models.go Outdated
ProjectDescription string
EnableDora bool
MetricPlugins []ProjectPlugin
Blueprints *models.Blueprint
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the trailing s

@abeizn abeizn force-pushed the post-project-bp branch from 8cb199f to 26149a0 Compare May 13, 2024 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants