Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeTWC1984 committed Mar 6, 2024
1 parent 5c8360e commit c9aa596
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
9 changes: 7 additions & 2 deletions bin/sshx-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,14 @@ if(uri.password) conf.password = decodeURIComponent(uri.password)
if (uri.searchParams.get('privateKey')) conf.privateKey = readFileSync(String(uri.searchParams.get('privateKey')))
if (uri.searchParams.get('passphrase')) conf.passphrase = uri.searchParams.get('passphrase')

if (!conf.password && !conf.privateKey ) {
printComplete(1, 1, "No password or key specified. Use SSH_PASSWORD/SSH_KEY env vars, or set via URI (ssh://user:[pass]@host?privateKey=/path/to/key")
process.exit(1)
}

try {
conn.on('error', (err) => { // handle configuration errors
stream.write({
printJson({
complete: 1,
code: 1,
description: err.message
Expand Down Expand Up @@ -177,7 +182,7 @@ try {
}).connect(conf)
}
catch (err) {
stream.write({
printJson({
complete: 1,
code: 1,
description: err.message
Expand Down
2 changes: 1 addition & 1 deletion htdocs/js/pages/JobDetails.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ Class.subclass(Page.Base, "Page.JobDetails", {
html += '<div class="subtitle" style="margin-top:7px; margin-bottom:13px;">';
html += 'Completed Job';

if(event.id) html += `<div class="subtitle_widget" style="margin-left:5px;"><a href="#History?sub=event_history&id=${event.id}"><i class="fa fa-arrow-circle-right">&nbsp;</i><b>Jump to History</b></a></div>`
if (event.id && !event.multiplex) html += '<div class="subtitle_widget" style="margin-left:2px;"><span class="link" onMouseUp="$P().run_again()"><i class="fa fa-repeat">&nbsp;</i><b>Run Again</b></span></div>';
if (event.id) html += `<div class="subtitle_widget" style="margin-left:5px;"><a href="#History?sub=event_history&id=${event.id}"><i class="fa fa-arrow-circle-right">&nbsp;</i><b>Jump to History</b></a></div>`;
//adding edit button on job detail page
if (event.id) html += '<div class="subtitle_widget" style="margin-left:2px;"><a href="#Schedule?sub=edit_event&id=' + event.id + '" target="_self"><span class="link"><i class="fa fa-edit">&nbsp;</i><b>Edit</b></span></a></div>';
if (app.isAdmin()) html += '<div class="subtitle_widget"><span class="link abort" onMouseUp="$P().delete_job()"><i class="fa fa-trash-o">&nbsp;</i><b>Delete Job</b></span></div>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/js/pages/Schedule.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@ Class.subclass(Page.Base, "Page.Schedule", {

// Secret
let sph = event.secret_preview ? '[' + event.secret_preview + ']' : '';
html += get_form_table_row('Secret', `<textarea style="width:420px; height:45px;resize:vertical;" id="fe_ee_secret" oninput="$P().set_event_secret(this.value)" placeholder="${sph}" spellcheck="false"></textarea>`);
html += get_form_table_row('Secret', `<textarea style="width:620px; height:45px;resize:vertical;" id="fe_ee_secret" oninput="$P().set_event_secret(this.value)" placeholder="${sph}" spellcheck="false"></textarea>`);
html += get_form_table_caption("Specify KEY=VALUE pairs to be mounted as env variables (to this job process)");
html += get_form_table_spacer();

Expand Down
2 changes: 1 addition & 1 deletion lib/api/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ module.exports = Class.create({
let total = 0
let max = params.max || 0
let jobs = []
let filter = { has_error: false }
let filter = { }
if(params.id) filter.event = params.id
if(params.arg) filter.arg = params.arg
if(params.error) filter.has_error = true // delete filter.has_error
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c9aa596

Please sign in to comment.