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

Add posibility to set Queue Name for inmediate Job Calls. #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Content/management.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@


if (send.type === 'Enqueue') {
// Nothing extra to read here
let queueNameInput = $(".commands-options.Enqueue .hdm-execution-input[id^='" + id + "']", container)
let val = queueNameInput.val();
send[queueNameInput.prop('id')] = val;
}
else if (send.type === 'ScheduleDateTime') {
let sdtTd = $(".commands-options.ScheduleDateTime .hdm-execution-input[id^='" + id + "']", container)
Expand Down
4 changes: 3 additions & 1 deletion src/Pages/ManagementBasePage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ string GetFormVariable(string key)
{
try
{
var jobId = client.Create(job, new EnqueuedState(jobMetadata.Queue));
var queueName = GetFormVariable($"{id}_queuename")??"default";
queueName = string.IsNullOrEmpty(queueName)? "default" : queueName;
var jobId = client.Create(job, new EnqueuedState(queueName));
jobLink = new UrlHelper(context).JobDetails(jobId);
}
catch (Exception e)
Expand Down
7 changes: 6 additions & 1 deletion src/Pages/Partials/ButtonPartial.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@
</ul>
</div>
<!-- Immediate Command -->
<div class="commands-panel col-xs-12 Enqueue col-sm-9">
<div class="commands-options Enqueue col-xs-12 col-sm-6">
<label class="control-label">Queue Name:</label>
<input type='text' class="form-control hdm-execution-input" placeholder="QueueName" id="@($"{JobId}_queuename")" value="@Job.Queue" />
</div>

<div class="commands-panel col-xs-12 Enqueue col-sm-3">
<button class="hdm-management-input-commands btn btn-sm btn-success" data-url="@Url.To(url)" data-loading-text="@loadingText" input-id="@JobId" input-type="Enqueue">
<span class="glyphicon glyphicon-play-circle"></span>
Queue Execution
Expand Down
Loading