-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: filter task by project (#20195)
Co-authored-by: Qiu Jian <[email protected]>
- Loading branch information
Showing
18 changed files
with
724 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright 2019 Yunion | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package apis | ||
|
||
import ( | ||
"time" | ||
|
||
"yunion.io/x/jsonutils" | ||
) | ||
|
||
type TaskListInput struct { | ||
ModelBaseListInput | ||
ProjectizedResourceListInput | ||
|
||
Id []string `json:"id" help:"id filter"` | ||
ObjId []string `json:"obj_id" help:"object id filter"` | ||
ObjName []string `json:"obj_name" help:"object type (in singular form) filter"` | ||
TaskName []string `json:"task_name" help:"task name filter"` | ||
IsMulti *bool `json:"is_multi" negative:"is_single" help:"is multi task"` | ||
IsComplete *bool `json:"is_complete" negative:"not_complete" help:"is task completed, either fail or complete"` | ||
IsInit *bool `json:"is_init" negative:"not_init" help:"is task started?"` | ||
Stage []string `json:"stage" help:"task stage"` | ||
ParentId []string `json:"parent_id" help:"filter tasks by parent_task_id"` | ||
IsRoot *bool `json:"is_root" help:"filter root tasks"` | ||
} | ||
|
||
type TaskDetails struct { | ||
ModelBaseDetails | ||
ProjectizedResourceInfo | ||
|
||
// 资源创建时间 | ||
CreatedAt time.Time `json:"created_at"` | ||
// 资源更新时间 | ||
UpdatedAt time.Time `json:"updated_at"` | ||
// 资源被更新次数 | ||
UpdateVersion int `json:"update_version"` | ||
// 开始任务时间 | ||
StartAt time.Time `json:"start_at"` | ||
// 完成任务时间 | ||
EndAt time.Time `json:"end_at"` | ||
|
||
DomainId string `json:"domain_id"` | ||
ProjectId string `json:"tenant_id"` | ||
|
||
Id string | ||
ObjName string | ||
ObjId string | ||
TaskName string | ||
Params *jsonutils.JSONDict | ||
Stage string | ||
ParentTaskId string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.