Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Execution viewer release work #6157

Merged
merged 36 commits into from Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5fadadd
Node 12 build
ProTip May 19, 2020
4691ddc
Fix sass errors
ProTip May 22, 2020
57d759e
Storybook
ProTip May 22, 2020
c7197b5
Remove copy plugin to prevent asset bundling
ProTip May 26, 2020
5a2c9ba
API playback for storybook and jest testing
ProTip Jun 15, 2020
6a68b4f
Move theme assets
ProTip Jun 15, 2020
da3538a
Add extra public dirs
ProTip Jun 15, 2020
d4cb717
Playback from fixtures
ProTip Jun 15, 2020
0166f1b
Add more execution output states and fixtures
ProTip Jun 16, 2020
0bc953a
Working
ProTip Jun 16, 2020
6eb5cdd
Hide gutter overflow behind ellipsis
ProTip Jun 17, 2020
30a36c5
Do not hide settings bar
ProTip Jun 17, 2020
00aa206
Storybook checkin
ProTip Jun 17, 2020
aa08516
Live adjustment of viewer settings
ProTip Jun 17, 2020
7537b4c
Wire store in
ProTip Jun 17, 2020
46cce37
Use bootstrap form components
ProTip Jun 18, 2020
1dcb09f
Update uiv
ProTip Jun 18, 2020
136c671
Update package lock
ProTip Jun 18, 2020
ec2c095
Setup CSS source maps
ProTip Jun 19, 2020
96c106c
Bundle local styles
ProTip Jun 19, 2020
323d9bf
Fix theme select to work in core
ProTip Jun 19, 2020
ebaab35
Load less styles
ProTip Jun 19, 2020
602aa5a
Upgrade dep
ProTip Jun 19, 2020
b83d59d
Checkin package lock
ProTip Jun 19, 2020
101765e
Remove extraneous vue use and theme setting
ProTip Jun 19, 2020
97ff424
Upgrade ts-rundeck to @rundeck/client
ProTip Jun 19, 2020
16b16eb
Cleanup
ProTip Jun 19, 2020
b3383f7
Complete @rundec client and ui-trellis import updates
ProTip Jun 19, 2020
4fa5ef5
Make new viewer the default for execution show
ProTip Jun 19, 2020
b6f3279
Fix active tab switching
ProTip Jun 19, 2020
b46433a
Fix rundeck client dep
ProTip Jun 19, 2020
7e8a122
Fix rundeck client imports
ProTip Jun 19, 2020
f390034
Fix lock file
ProTip Jun 19, 2020
b5989b9
Wire new viewer into adhoc commands page
ProTip Jun 21, 2020
106db51
Wire new viewer into node view
ProTip Jun 22, 2020
1c4006a
Fix: checkbox labels don't activate inputs for viewer settings
gschueler Jun 22, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 8 additions & 2 deletions rundeckapp/grails-app/assets/javascripts/executionStateKO.js
Expand Up @@ -928,8 +928,8 @@ function NodeFlowViewModel(workflow, outputUrl, nodeStateUpdateUrl, multiworkflo
{id: 'output', title: 'Log Output'},
];

if (window._rundeck.feature.betaExecOutputViewer.enabled === true) {
tabs.push({id: 'output-beta', title: 'Log Output Beta'});
if (window._rundeck.feature.legacyExecOutputViewer.enabled === true) {
tabs.push({id: 'output-legacy', title: 'Log Output Legacy'});
}

self.tabs = ko.observableArray(data.tabs || tabs)
Expand Down Expand Up @@ -1127,6 +1127,12 @@ function NodeFlowViewModel(workflow, outputUrl, nodeStateUpdateUrl, multiworkflo
}
};
self.showOutput= function (nodestep) {
if (!window._rundeck.feature?.legacyExecOutputViewer?.enabled) {
/** Kick the event out to Vue Land and let the new viewer handle display */
window._rundeck.eventBus.$emit('ko-exec-show-output', nodestep)
return
}

var node=nodestep.node.name;
var stepctx=nodestep.stepctx;
var sel = '.wfnodeoutput[data-node="' + node + '"]';
Expand Down
15 changes: 13 additions & 2 deletions rundeckapp/grails-app/assets/javascripts/framework/adhoc.js
Expand Up @@ -110,6 +110,8 @@ function startRunFollow(data) {
mode: 'tail'
}), function (resp, status, jqxhr) {
if (status == 'success') {
/** Kick this event into Vue Land */
window._rundeck.eventBus.$emit('ko-adhoc-running', data)
Element.show('runcontent');
_initAffix();
var nodeflowvm=continueRunFollow(data);
Expand Down Expand Up @@ -154,7 +156,6 @@ function continueRunFollow(data) {
//truncateToTail: false,
execData: {},
appLinks: appLinks,
onComplete: onRunComplete,
// dobind: true
});
var nodeflowvm=new NodeFlowViewModel(
Expand Down Expand Up @@ -184,15 +185,25 @@ function continueRunFollow(data) {
reloadInterval:1500
});
nodeflowvm.followFlowState(flowState);
nodeflowvm.logoutput().beginFollowingOutput(data.id);
if (window._rundeck.feature?.legacyExecOutputViewer?.enabled)
nodeflowvm.logoutput().beginFollowingOutput(data.id);

flowState.beginFollowing();
/** Base the complete event on the flow view instead of the "log"
* so it will kick if the legacy log viewer is disabled */
nodeflowvm.completed.subscribe(onCompletedChange)
var oldControl=adhocCommand.followControl;
adhocCommand.followControl=followControl;
if(oldControl){
oldControl.stopFollowingOutput();
}
return nodeflowvm;
}

function onCompletedChange(val) {
if (val == true)
onRunComplete()
}
function onRunComplete() {
adhocCommand.running(false);
afterRun();
Expand Down
12 changes: 6 additions & 6 deletions rundeckapp/grails-app/assets/scss/paper/_select.scss
Expand Up @@ -84,9 +84,9 @@
border-radius:10px;
}

@include select('default', $default-color)
@include select('info', $info-color)
@include select('primary', $primary-color)
@include select('success', $success-color)
@include select('warning', $warning-color)
@include select('danger', $danger-color)
@include select('default', $default-color);
@include select('info', $info-color);
@include select('primary', $primary-color);
@include select('success', $success-color);
@include select('warning', $warning-color);
@include select('danger', $danger-color);
10 changes: 5 additions & 5 deletions rundeckapp/grails-app/assets/scss/paper/_slider.scss
Expand Up @@ -22,8 +22,8 @@
}
}

@include slider('info', $info-color)
@include slider('primary', $primary-color)
@include slider('success', $success-color)
@include slider('warning', $warning-color)
@include slider('danger', $danger-color)
@include slider('info', $info-color);
@include slider('primary', $primary-color);
@include slider('success', $success-color);
@include slider('warning', $warning-color);
@include slider('danger', $danger-color);
Expand Up @@ -256,8 +256,8 @@
}
}

@include pagination($primary-color, 'primary')
@include pagination($info-color, 'info')
@include pagination($success-color, 'success')
@include pagination($warning-color, 'warning')
@include pagination($danger-color, 'danger')
@include pagination($primary-color, 'primary');
@include pagination($info-color, 'info');
@include pagination($success-color, 'success');
@include pagination($warning-color, 'warning');
@include pagination($danger-color, 'danger');
10 changes: 5 additions & 5 deletions rundeckapp/grails-app/assets/scss/paper/_tags.scss
Expand Up @@ -31,8 +31,8 @@

}

@include tag('info', $info-color)
@include tag('primary', $primary-color)
@include tag('success', $success-color)
@include tag('warning', $warning-color)
@include tag('danger', $danger-color)
@include tag('info', $info-color);
@include tag('primary', $primary-color);
@include tag('success', $success-color);
@include tag('warning', $warning-color);
@include tag('danger', $danger-color);
2 changes: 1 addition & 1 deletion rundeckapp/grails-app/conf/application.groovy
Expand Up @@ -27,7 +27,7 @@ environments {
rundeck.feature.workflowDynamicStepSummaryGUI.enabled = true
rundeck.feature.cleanExecutionsHistoryJob.enabled = true
rundeck.feature.executionLifecyclePlugin.enabled = true
rundeck.feature.betaExecOutputViewer.enabled = true
rundeck.feature.legacyExecOutputViewer.enabled = false
dataSource {
dbCreate = "create-drop" // one of 'create', 'create-drop','update'
url = "jdbc:h2:file:./db/devDb"
Expand Down
2 changes: 1 addition & 1 deletion rundeckapp/grails-app/i18n/messages.properties
Expand Up @@ -354,7 +354,7 @@ execution.show.mode.Annotated.desc=View all output in grouped contexts sequentia
execution.show.mode.Compact.desc=View all output collated by node
execution.show.mode.Compact.title=Lines Grouped by Node
execution.show.mode.Log.title=Log Output
execution.show.mode.LogBeta.title=Log Output Beta
execution.show.mode.LogLegacy.title=Log Output Legacy
execution.show.mode.Tail.title=Tail Output

execution.log.storage.state.PENDING_REMOTE=Waiting for log output to become available...
Expand Down
2 changes: 1 addition & 1 deletion rundeckapp/grails-app/i18n/messages_es_419.properties
Expand Up @@ -346,7 +346,7 @@ execution.show.mode.Annotated.desc=Ver todas las salidas en contextos agrupados
execution.show.mode.Compact.desc=Ver todas las salidas reunidas por nodos
execution.show.mode.Compact.title=Por Nodo
execution.show.mode.Log.title=Salida de registo
execution.show.mode.LogBeta.title=Salida de registo beta
execution.show.mode.LogLegacy.title=Salida de registo legado
execution.show.mode.Tail.title=Salida de Cola

execution.log.storage.state.PENDING_REMOTE=Esperando que la salida del registro esté disponible...
Expand Down
39 changes: 18 additions & 21 deletions rundeckapp/grails-app/views/execution/show.gsp
Expand Up @@ -65,7 +65,7 @@
<asset:javascript src="workflow.test.js"/>
<asset:javascript src="util/compactMapList.test.js"/>
</g:if>
<g:jsMessages codes="['execution.show.mode.Log.title','execution.show.mode.LogBeta.title','execution.page.show.tab.Nodes.title']"/>
<g:jsMessages codes="['execution.show.mode.Log.title','execution.show.mode.LogLegacy.title','execution.page.show.tab.Nodes.title']"/>

<asset:stylesheet href="static/css/pages/project-dashboard.css"/>
<g:jsMessages code="jobslist.date.format.ko,select.all,select.none,delete.selected.executions,cancel.bulk.delete,cancel,close,all,bulk.delete,running"/>
Expand Down Expand Up @@ -174,12 +174,10 @@ search
})
</g:javascript>
<asset:javascript src="static/pages/project-activity.js" defer="defer"/>

<feature:enabled name="betaExecOutputViewer">
<asset:stylesheet href="static/css/chunk-vendors.css"/>
<asset:stylesheet href="static/css/components/execution-log.css"/>
<asset:javascript src="static/components/execution-log.js" defer="defer"/>
</feature:enabled>

<asset:stylesheet href="static/css/chunk-vendors.css"/>
<asset:stylesheet href="static/css/pages/execution-show.css"/>
<asset:javascript src="static/pages/execution-show.js" defer="defer"/>
</head>
<g:set var="isAdhoc" value="${!scheduledExecution && execution.workflow.commands.size() == 1}"/>
<body id="executionShowPage">
Expand Down Expand Up @@ -610,7 +608,7 @@ search

<span data-bind="visible: completed()" class="execution-action-links pull-right">

<a data-bind="visible: activeTab() == 'output'" href="#view-options-modal" class="btn btn-secondary btn-sm" data-toggle="modal">
<a data-bind="visible: activeTab() == 'output-legacy'" href="#view-options-modal" class="btn btn-secondary btn-sm" data-toggle="modal">
<g:message code="execution.page.view.options.title"/>
<i class="glyphicon glyphicon-cog"></i>
</a>
Expand Down Expand Up @@ -842,18 +840,17 @@ search
</div>
</div>

<div class="tab-pane " id="output" data-bind="css: {active: activeTab()==='output'}">
<g:render template="/execution/showFragment"
model="[execution: execution, scheduledExecution: scheduledExecution, inlineView: false, followmode: followmode]"/>
</div>

<div style="height: calc(100vh - 250px); display: none; contain: layout;"
id="output-beta"
id="output"
class="card-content-full-width"
data-bind="visible: activeTab().startsWith('output-beta')"
data-bind="visible: activeTab() === 'output' || activeTab().startsWith('outputL')"
>
<div class="execution-log-viewer" data-execution-id="${execution.id}" data-theme="light" data-follow="true"></div>
</div>

<div class="tab-pane " id="output-legacy" data-bind="css: {active: activeTab()==='output-legacy'}">
<g:render template="/execution/showFragment"
model="[execution: execution, scheduledExecution: scheduledExecution, inlineView: false, followmode: followmode]"/>
</div>

</div>
Expand Down Expand Up @@ -891,7 +888,7 @@ search
</div>

<div data-ko-bind="nodeflow"
data-bind="visible: logoutput().fileLoadError() && activeTab()==='output'"
data-bind="visible: logoutput().fileLoadError() && activeTab()==='output-legacy'"
class="alert alert-warning"
style="display:none">
<span data-bind="text: logoutput().fileLoadError" ></span>
Expand Down Expand Up @@ -1170,7 +1167,7 @@ search
tabs:[
{id: 'nodes', title: message('execution.page.show.tab.Nodes.title')},
{id: 'output', title: message('execution.show.mode.Log.title')},
{id: 'output-beta', title: message('execution.show.mode.LogBeta.title')}
{id: 'output-legacy', title: message('execution.show.mode.LogLegacy.title')}
]
});

Expand All @@ -1197,7 +1194,7 @@ search
window.location.hash = "#" + val
if (val === 'nodes') {
followState();
}else if(val==='output'){
}else if(val==='output-legacy'){
followOutput();
}
});
Expand Down Expand Up @@ -1248,10 +1245,10 @@ search
});
followState();
var outDetails = window.location.hash;
if(outDetails === '#output') {
nodeflowvm.activeTab("output");
} else if (outDetails.startsWith('#output-beta')) {
if(outDetails.startsWith('#output') && !outDetails.includes('legacy')) {
nodeflowvm.activeTab(outDetails.slice(1))
} else if (outDetails === '#output-legacy') {
nodeflowvm.activeTab("output-legacy")
} else if (outDetails === '#nodes') {
nodeflowvm.activeTab("nodes");
}else{
Expand Down
6 changes: 5 additions & 1 deletion rundeckapp/grails-app/views/framework/adhoc.gsp
Expand Up @@ -34,7 +34,11 @@
kind: 'event'
)}"/>

<asset:javascript src="executionState.js"/>
<feature:disabled name="legacyExecOutputViewer">
<asset:javascript src="static/css/pages/command.css"/>
<asset:javascript src="static/pages/command.js"/>
</feature:disabled>
<asset:javascript src="executionState.js"/>
<asset:javascript src="executionControl.js"/>
<asset:javascript src="util/yellowfade.js"/>
<asset:javascript src="framework/adhoc.js"/>
Expand Down
3 changes: 2 additions & 1 deletion rundeckapp/grails-app/views/layouts/base.gsp
Expand Up @@ -135,12 +135,13 @@
activeTourStep: '${session.filterPref?.activeTourStep}',
hideVersionUpdateNotification: '${session.filterPref?.hideVersionUpdateNotification}',
feature: {
betaExecOutputViewer: {enabled: ${grailsApplication.config.rundeck?.feature?.betaExecOutputViewer?.enabled}}
legacyExecOutputViewer: {enabled: ${grailsApplication.config.rundeck?.feature?.legacyExecOutputViewer?.enabled}},
}
})
</script>

<g:jsonToken id="ui_token" url="${request.forwardURI}"/>
<asset:stylesheet href="static/css/chunk-vendors.css"/>
<asset:stylesheet href="static/css/chunk-common.css"/>
<asset:javascript src="static/js/chunk-common.js"/>
<asset:javascript src="static/js/chunk-vendors.js"/>
Expand Down
Expand Up @@ -77,11 +77,11 @@
''}>
<g:message code="execution.show.mode.Log.title"/>
</option>
<feature:enabled name="betaExecOutputViewer">
<option value="output-beta" ${scheduledExecution.defaultTab == 'output-beta' ?
<feature:enabled name="legacyExecOutputViewer">
<option value="output-legacy" ${scheduledExecution.defaultTab == 'output-legacy' ?
'selected="selected"' :
''}>
<g:message code="execution.show.mode.LogBeta.title"/>
<g:message code="execution.show.mode.LogLegacy.title"/>
</option>
</feature:enabled>
<option value="html" ${scheduledExecution.defaultTab == 'html' ?
Expand Down
1 change: 1 addition & 0 deletions rundeckapp/grails-spa/.nvmrc
@@ -0,0 +1 @@
v12.16.3