feat: added visualization for awx jobs

feature/DEV-380
Sven Ketelsen 4 years ago
parent 06a395855b
commit 9f18847223

@ -0,0 +1,19 @@
{
"name" : "awx-job-plain",
"restApi" : true,
"configKey" : "awx-job-plain",
"payloadType" : "REST",
"config" : [ {
"name" : "connection",
"type" : "CONNECTION",
"value" : "awx"
}, {
"name" : "resource",
"type" : "STRING",
"value" : "api/v2/jobs/${id}/"
}, {
"name" : "sqlStatement",
"type" : "STRING",
"value" : "SELECT status,failed,started,finished,name,description FROM default_table"
} ]
}

@ -0,0 +1,168 @@
{
"name" : "Current Job Left",
"configKey" : "current-job-left",
"page" : 0,
"components" : [ {
"label" : "Current Job",
"hideLabel" : true,
"persistent" : false,
"mask" : false,
"disabled" : true,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "datasourcecontainer",
"input" : true,
"key" : "job",
"defaultValue" : {
"tenant" : {
"id" : ""
}
},
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"data" : {
"url" : "api/v1/scopes/{{context.scopeId}}/tags/{{context.scopeTag}}/datasources/awx-job-plain/query?id={{data.current_job_id}}",
"method" : "GET",
"values" : [ { } ]
},
"components" : [ {
"label" : "Current Job",
"hideLabel" : true,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "container",
"input" : true,
"key" : "job",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"components" : [ {
"label" : "Name",
"labelPosition" : "left-left",
"allowMultipleMasks" : false,
"showWordCount" : false,
"showCharCount" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "textfield",
"input" : true,
"key" : "name",
"defaultValue" : "",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"properties" : { },
"inputFormat" : "plain",
"encrypted" : false,
"tags" : [ ],
"customConditional" : "",
"logic" : [ ],
"widget" : {
"type" : ""
},
"reorder" : false
}, {
"label" : "Beschreibung",
"labelPosition" : "left-left",
"allowMultipleMasks" : false,
"showWordCount" : false,
"showCharCount" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "textfield",
"input" : true,
"key" : "description",
"defaultValue" : "",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"properties" : { },
"inputFormat" : "plain",
"encrypted" : false,
"tags" : [ ],
"customConditional" : "",
"logic" : [ ],
"widget" : {
"type" : ""
},
"reorder" : false
}, {
"label" : "Status",
"labelPosition" : "left-left",
"allowMultipleMasks" : false,
"showWordCount" : false,
"showCharCount" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "textfield",
"input" : true,
"key" : "status",
"defaultValue" : "",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"properties" : { },
"inputFormat" : "plain",
"encrypted" : false,
"tags" : [ ],
"customConditional" : "",
"logic" : [ ],
"widget" : {
"type" : ""
},
"reorder" : false
} ],
"tabs" : null,
"properties" : { },
"tags" : [ ],
"encrypted" : false,
"customConditional" : "",
"logic" : [ ],
"reorder" : false
} ],
"tabs" : null,
"properties" : { },
"datapath" : "0",
"encrypted" : false,
"tags" : [ ],
"customConditional" : "",
"logic" : [ ],
"reorder" : false
} ],
"display" : "form"
}

@ -0,0 +1,138 @@
{
"name" : "Current Job Right",
"configKey" : "current-job-right",
"page" : 0,
"components" : [ {
"label" : "Current Job",
"hideLabel" : true,
"persistent" : false,
"mask" : false,
"disabled" : true,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "datasourcecontainer",
"input" : true,
"key" : "job",
"defaultValue" : {
"tenant" : {
"id" : ""
}
},
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"data" : {
"url" : "api/v1/scopes/{{context.scopeId}}/tags/{{context.scopeTag}}/datasources/awx-job-plain/query?id={{data.current_job_id}}",
"method" : "GET",
"values" : [ { } ]
},
"components" : [ {
"label" : "Current Job",
"hideLabel" : true,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "container",
"input" : true,
"key" : "job",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"components" : [ {
"label" : "HTML",
"labelPosition" : "left-left",
"className" : "",
"attrs" : [ {
"attr" : "",
"value" : ""
} ],
"content" : "<div class=\"h2\">\n <!-- pending, running, successful, error, failed, canceled -->\n <span style=\"display: {{ data.status == 'pending' ? '' : 'none' }}\" class=\"badge badge-info\">{{ data.status }}</span>\n <span style=\"display: {{ data.status == 'running' ? '' : 'none' }}\" class=\"badge badge-primary\">{{ data.status }}</span>\n <span style=\"display: {{ data.status == 'successful' ? '' : 'none' }}\" class=\"badge badge-success\">{{ data.status }}</span>\n <span style=\"display: {{ data.status == 'error' ? '' : 'none' }}\" class=\"badge badge-danger\">{{ data.status }}</span>\n <span style=\"display: {{ data.status == 'failed' ? '' : 'none' }}\" class=\"badge badge-warning\">{{ data.status }}</span>\n <span style=\"display: {{ data.status == 'canceled' ? '' : 'none' }}\" class=\"badge badge-warning\">{{ data.status }}</span>\n</div>",
"refreshOnChange" : true,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "htmlelement",
"input" : false,
"key" : "html",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"encrypted" : false,
"properties" : { },
"tags" : [ ],
"customConditional" : "",
"logic" : [ ],
"refreshOn" : "data",
"reorder" : false
}, {
"label" : "Status",
"labelPosition" : "left-left",
"allowMultipleMasks" : false,
"showWordCount" : false,
"showCharCount" : false,
"hidden" : true,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "textfield",
"input" : true,
"key" : "status",
"defaultValue" : "",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"properties" : { },
"inputFormat" : "plain",
"encrypted" : false,
"tags" : [ ],
"customConditional" : "",
"logic" : [ ],
"widget" : {
"type" : ""
},
"reorder" : false
} ],
"tabs" : null,
"properties" : { },
"tags" : [ ],
"encrypted" : false,
"customConditional" : "",
"logic" : [ ],
"reorder" : false
} ],
"tabs" : null,
"properties" : { },
"datapath" : "0",
"encrypted" : false,
"tags" : [ ],
"customConditional" : "",
"logic" : [ ],
"reorder" : false
} ],
"display" : "form"
}

@ -0,0 +1,78 @@
{
"name" : "Current Jobs",
"configKey" : "current-jobs",
"page" : 0,
"components" : [ {
"label" : "Jobs",
"disableAddingRemovingRows" : true,
"disableAddingRows" : true,
"defaultOpen" : false,
"layoutFixed" : false,
"striped" : false,
"bordered" : true,
"enableRowGroups" : false,
"reorder" : false,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "datagrid",
"input" : true,
"key" : "jobs",
"defaultValue" : [ { } ],
"validate" : {
"customMessage" : "",
"json" : "",
"minLength" : null,
"maxLength" : null
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"components" : [ {
"label" : "Job",
"hideLabel" : true,
"persistent" : false,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "datasourcecontainer",
"input" : true,
"key" : "job",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"data" : {
"url" : "api/v1/scopes/{{context.scopeId}}/tags/{{context.scopeTag}}/datasources/awx-job-plain/query?id={{ row }}",
"method" : "GET",
"values" : [ { } ]
},
"components" : [ ],
"tabs" : null,
"properties" : { },
"tags" : [ ],
"datapath" : "",
"encrypted" : false,
"customConditional" : "",
"logic" : [ ],
"row" : "0-0",
"reorder" : false
} ],
"tabs" : null,
"properties" : { },
"encrypted" : false,
"tags" : null,
"customConditional" : "",
"logic" : [ ],
"addAnother" : "",
"groupToggle" : false
} ],
"display" : "form"
}

@ -0,0 +1,98 @@
{
"name" : "Progress Bar",
"configKey" : "progress-bar",
"page" : 0,
"components" : [ {
"label" : "HTML",
"labelPosition" : "left-left",
"className" : "",
"attrs" : [ {
"attr" : "",
"value" : ""
} ],
"content" : "<div class=\"progress\">\n <div\n class=\"progress-bar progress-bar-striped progress-bar-animated\"\n role=\"progressbar\"\n aria-valuenow=\"{{ data.progress_current }}\"\n aria-valuemin=\"0\"\n aria-valuemax=\"{{ data.progress_max }}\"\n style=\"width: {{ data.progress_current / data.progress_max * 100 }}%\">\n </div>\n</div>",
"refreshOnChange" : true,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "htmlelement",
"input" : false,
"key" : "html",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"encrypted" : false,
"properties" : { },
"tags" : null,
"customConditional" : "",
"logic" : [ ],
"refreshOn" : "data",
"reorder" : false
}, {
"label" : "progress_current",
"labelPosition" : "left-left",
"hidden" : true,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "number",
"input" : true,
"key" : "progress_current",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"delimiter" : false,
"requireDecimal" : false,
"encrypted" : false,
"properties" : { },
"tags" : [ ],
"decimalLimit" : null,
"customConditional" : "",
"logic" : [ ],
"reorder" : false
}, {
"label" : "progress_max",
"labelPosition" : "left-left",
"hidden" : true,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "number",
"input" : true,
"key" : "progress_max",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"delimiter" : false,
"requireDecimal" : false,
"encrypted" : false,
"decimalLimit" : null,
"properties" : { },
"tags" : [ ],
"customConditional" : "",
"logic" : [ ],
"reorder" : false
} ],
"display" : "form"
}

@ -3,148 +3,6 @@
"configKey" : "simple-connect", "configKey" : "simple-connect",
"page" : 0, "page" : 0,
"components" : [ { "components" : [ {
"label" : "Status",
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "well",
"input" : false,
"key" : "status",
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"components" : [ {
"label" : "HTML",
"className" : "",
"attrs" : [ {
"attr" : "",
"value" : ""
} ],
"content" : "<h2>Status</h2>",
"refreshOnChange" : false,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "htmlelement",
"input" : false,
"key" : "html5",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"encrypted" : false,
"properties" : { },
"tags" : null,
"customConditional" : "",
"logic" : [ ],
"reorder" : false
}, {
"label" : "HTML",
"labelPosition" : "left-left",
"className" : "",
"attrs" : [ {
"attr" : "",
"value" : ""
} ],
"content" : "<div class=\"progress\">\n <div\n class=\"progress-bar progress-bar-striped progress-bar-animated\"\n role=\"progressbar\"\n aria-valuenow=\"{{ data.progress_current }}\"\n aria-valuemin=\"0\"\n aria-valuemax=\"{{ data.progress_max }}\"\n style=\"width: {{ data.progress_current / data.progress_max * 100 }}%\">\n </div>\n</div>",
"refreshOnChange" : true,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "htmlelement",
"input" : false,
"key" : "html",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"encrypted" : false,
"properties" : { },
"tags" : null,
"customConditional" : "",
"logic" : [ ],
"refreshOn" : "data",
"reorder" : false
}, {
"label" : "progress_current",
"labelPosition" : "left-left",
"hidden" : true,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "number",
"input" : true,
"key" : "progress_current",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"delimiter" : false,
"requireDecimal" : false,
"encrypted" : false,
"properties" : { },
"tags" : [ ],
"decimalLimit" : null,
"customConditional" : "",
"logic" : [ ],
"reorder" : false
}, {
"label" : "progress_max",
"labelPosition" : "left-left",
"hidden" : true,
"mask" : false,
"tableView" : true,
"alwaysEnabled" : false,
"type" : "number",
"input" : true,
"key" : "progress_max",
"validate" : {
"customMessage" : "",
"json" : ""
},
"conditional" : {
"show" : "",
"when" : "",
"json" : ""
},
"tabs" : null,
"delimiter" : false,
"requireDecimal" : false,
"encrypted" : false,
"decimalLimit" : null,
"properties" : { },
"tags" : [ ],
"customConditional" : "",
"logic" : [ ],
"reorder" : false
} ],
"tabs" : null,
"reorder" : false,
"properties" : { },
"tags" : null,
"customConditional" : "",
"logic" : [ ]
}, {
"label" : "Links", "label" : "Links",
"mask" : false, "mask" : false,
"tableView" : true, "tableView" : true,

@ -4,80 +4,111 @@
"tabExpression" : "{{ data.cluster.stage }}-{{ data.tenant.key }}-{{ data.cluster.name }}", "tabExpression" : "{{ data.cluster.stage }}-{{ data.tenant.key }}-{{ data.cluster.name }}",
"readonlyExpression" : "data.vorgang_status > 10", "readonlyExpression" : "data.vorgang_status > 10",
"components" : [ { "components" : [ {
"type" : "columns", "type" : "columns",
"key" : "dossier", "key" : "dossier",
"columns" : [ { "columns" : [ {
"components" : [ {
"type" : "form",
"key" : "header",
"readonlyExpression" : "true"
}, {
"type" : "html",
"content" : "<hr>"
}, {
"type" : "columns",
"key" : "first-column",
"columns" : [ {
"components" : [ { "components" : [ {
"type" : "page", "type" : "form",
"key" : "dossier-page", "key" : "header",
"toc" : "left", "readonlyExpression" : "true"
"sections" : [ { },
"type" : "section", {
"key" : "master-data", "type" : "html",
"title" : "Stammdaten", "content" : "<hr>"
"components" : [ { },
"type" : "form", {
"key" : "tenant", "type" : "columns",
"readonlyExpression" : "true" "key" : "first-column",
} ] "columns" : [ {
}, { "components" : [ {
"type" : "section", "type" : "page",
"key" : "smardigo", "key" : "dossier-page",
"title" : "Smardigo", "toc" : "left",
"components" : [ { "sections" : [
"type" : "form", {
"key" : "simple-connect" "type" : "section",
} ] "key" : "aktionen",
}, { "title" : "Aktionen",
"type" : "section", "visibleExpression": "(data.vorgang_status >= 40 && data.vorgang_status < 50)||(data.vorgang_status >= 60)",
"key" : "dossier-attachments", "components" : [ {
"title" : "Anhänge", "type" : "form",
"components" : [ { "key" : "progress-bar",
"type" : "form", "readonlyExpression" : "true"
"key" : "attachments" }, {
} ] "type" : "columns",
}, { "key" : "a_key",
"type" : "section", "columns" : [ {
"key" : "dossier-comments", "width" : "75%",
"title" : "Kommentare", "components" : [ {
"components" : [ { "type" : "form",
"type" : "comments", "key" : "current-job-left",
"key" : "comments" "readonlyExpression" : "true"
} ] } ]
}, { },
"type" : "section", {
"key" : "dossier-history", "width" : "25%",
"title" : "Protokoll", "components" : [ {
"components" : [ { "type" : "form",
"type" : "history", "key" : "current-job-right",
"key" : "history" "readonlyExpression" : "true"
} ] } ]
} ] } ]
} ], }, {
"width" : "9" "type" : "form",
}, { "key" : "current-jobs",
"components" : [ { "readonlyExpression" : "true"
"type" : "help-text", } ]
"key" : "help-text" }, {
}, { "type" : "section",
"type" : "action-list", "key" : "smardigo",
"key" : "action-list" "title" : "Smardigo",
} ], "components" : [ {
"width" : "350px" "type" : "form",
"key" : "simple-connect"
} ]
}, {
"type" : "section",
"key" : "stammdaten",
"title" : "Stammdaten",
"components" : [ {
"type" : "form",
"key" : "tenant",
"readonlyExpression" : "true"
} ]
}, {
"type" : "section",
"key" : "dossier-comments",
"title" : "Kommentare",
"components" : [ {
"type" : "comments",
"key" : "comments"
} ]
},
{
"type" : "section",
"key" : "dossier-history",
"title" : "Protokoll",
"components" : [ {
"type" : "history",
"key" : "history"
} ]
} ]
} ],
"width" : "9"
},
{
"components" : [ {
"type" : "help-text",
"key" : "help-text"
},
{
"type" : "action-list",
"key" : "action-list"
} ],
"width" : "350px"
} ]
} ],
"width" : "12"
} ] } ]
} ],
"width" : "12"
} ] } ]
} ] }
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save