Added other Jira resources
This commit is contained in:
@@ -629,7 +629,7 @@ function bindWorkflowProperties(elementId) {
|
||||
const totalWidth = properties_component.getBoundingClientRect().width
|
||||
console.debug("totalWidth", totalWidth)
|
||||
|
||||
const minPropertiesWidth = 340; // this value avoid scroll bars
|
||||
const minPropertiesWidth = 352; // this value avoid scroll bars
|
||||
|
||||
const inputSection = document.getElementById(`pi_${elementId}`);
|
||||
const propertiesSection = document.getElementById(`pp_${elementId}`);
|
||||
|
||||
@@ -196,7 +196,7 @@ class WorkflowDesigner(BaseComponent):
|
||||
def save_properties(self, component_id: str, details: dict):
|
||||
if component_id in self._state.components:
|
||||
component = self._state.components[component_id]
|
||||
component.properties = details
|
||||
component.properties |= details
|
||||
|
||||
undo_redo_attrs = UndoRedoAttrs(f"Set properties for {component.title}", on_undo=self.refresh_state)
|
||||
self._db.save_state(self._key, self._state, undo_redo_attrs)
|
||||
@@ -518,7 +518,7 @@ class WorkflowDesigner(BaseComponent):
|
||||
selected="selected" if name.value == request_type else None)
|
||||
|
||||
def _mk_input_group():
|
||||
if request_type == JiraRequestTypes.Issues.value:
|
||||
if request_type == JiraRequestTypes.Search.value:
|
||||
return Div(
|
||||
Input(type="text",
|
||||
name="request",
|
||||
@@ -538,7 +538,7 @@ class WorkflowDesigner(BaseComponent):
|
||||
)
|
||||
|
||||
def _mk_extra_parameters():
|
||||
if request_type == JiraRequestTypes.Issues.value:
|
||||
if request_type == JiraRequestTypes.Search.value:
|
||||
return Input(type="text",
|
||||
name="fields",
|
||||
value=component.properties.get("fields", DEFAULT_SEARCH_FIELDS),
|
||||
@@ -547,7 +547,7 @@ class WorkflowDesigner(BaseComponent):
|
||||
else:
|
||||
return None
|
||||
|
||||
request_type = component.properties.get("request_type", JiraRequestTypes.Issues.value)
|
||||
request_type = component.properties.get("request_type", JiraRequestTypes.Search.value)
|
||||
return Div(
|
||||
Fieldset(
|
||||
Legend("JQL", cls="fieldset-legend"),
|
||||
|
||||
@@ -186,40 +186,51 @@ class WorkflowDesignerProperties(BaseComponent):
|
||||
selected="selected" if name.value == request_type else None)
|
||||
|
||||
def _mk_input_group():
|
||||
if request_type == JiraRequestTypes.Issues.value:
|
||||
if request_type == JiraRequestTypes.Search.value or request_type == "issues": # remove issues at some point
|
||||
return [
|
||||
Div(
|
||||
Input(type="text",
|
||||
name="fields",
|
||||
value=self._component.properties.get("fields", DEFAULT_SEARCH_FIELDS),
|
||||
name=f"{request_type}_fields",
|
||||
value=self._component.properties.get(f"{request_type}_fields", DEFAULT_SEARCH_FIELDS),
|
||||
placeholder="default fields",
|
||||
cls="input w-full"),
|
||||
P("Jira fields to retrieve"),
|
||||
),
|
||||
Div(
|
||||
Input(type="text",
|
||||
name="request",
|
||||
value=self._component.properties.get("request", ""),
|
||||
name=f"{request_type}_request",
|
||||
value=self._component.properties.get(f"{request_type}_request", ""),
|
||||
placeholder="Enter JQL",
|
||||
cls="input w-full"),
|
||||
P("Write your jql code"),
|
||||
)
|
||||
]
|
||||
elif request_type == JiraRequestTypes.Comments.value:
|
||||
elif request_type in (JiraRequestTypes.Issue.value, JiraRequestTypes.Comments.value):
|
||||
return [
|
||||
Div(
|
||||
Input(type="text",
|
||||
name="request",
|
||||
value=self._component.properties.get("request", ""),
|
||||
name=f"{request_type}_request",
|
||||
value=self._component.properties.get(f"{request_type}_request", ""),
|
||||
placeholder="Issue id",
|
||||
cls="input w-full"),
|
||||
P("Put the issue id here"),
|
||||
)
|
||||
]
|
||||
elif request_type == JiraRequestTypes.Versions.value:
|
||||
return [
|
||||
Div(
|
||||
Input(type="text",
|
||||
name=f"{request_type}_request",
|
||||
value=self._component.properties.get(f"{request_type}_request", ""),
|
||||
placeholder="Project key",
|
||||
cls="input w-full"),
|
||||
P("Enter the project key"),
|
||||
)
|
||||
]
|
||||
else:
|
||||
return [Div("** Not Implemented **")]
|
||||
return [Div(f"** Not Implemented ** ('{request_type}' not supported yet)")]
|
||||
|
||||
request_type = self._component.properties.get("request_type", JiraRequestTypes.Issues.value)
|
||||
request_type = self._component.properties.get("request_type", JiraRequestTypes.Search.value)
|
||||
return Div(
|
||||
Fieldset(
|
||||
Legend("Jira", cls="fieldset-legend"),
|
||||
|
||||
@@ -191,13 +191,14 @@ class WorkflowPlayer(BaseComponent):
|
||||
component.properties["repository"],
|
||||
component.properties["table"]))
|
||||
elif key == (ProcessorTypes.Producer, "Jira"):
|
||||
request_type = component.properties["request_type"]
|
||||
engine.add_processor(
|
||||
JiraDataProducer(self._session,
|
||||
self._settings_manager,
|
||||
component.id,
|
||||
component.properties["request_type"],
|
||||
component.properties["request"],
|
||||
component.properties["fields"]))
|
||||
component.properties[f"{request_type}_request"],
|
||||
component.properties.get(f"{request_type}_fields", None)))
|
||||
elif key == (ProcessorTypes.Filter, "Default"):
|
||||
engine.add_processor(DefaultDataFilter(component.id, component.properties["filter"]))
|
||||
elif key == (ProcessorTypes.Presenter, "Default"):
|
||||
|
||||
Reference in New Issue
Block a user