Fixed runner import getting triggered with invalid information
ref #107
This commit is contained in:
parent
ef49e507c1
commit
ddd9c396b6
@ -19,6 +19,7 @@
|
|||||||
export let current_runners;
|
export let current_runners;
|
||||||
export let import_modal_open;
|
export let import_modal_open;
|
||||||
$: searchvalue = "";
|
$: searchvalue = "";
|
||||||
|
$: importButtonEnabled = recent_processed && (!(selected_org_or_team == "" || selected_org_or_team == null) || !(passed_org?.id == null || passed_org?.id == 0) || !(passed_team?.id == null || passed_team?.id == 0))
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
function cancelModal() {
|
function cancelModal() {
|
||||||
json_output = [];
|
json_output = [];
|
||||||
@ -44,7 +45,10 @@
|
|||||||
groups = groups.concat(orgs);
|
groups = groups.concat(orgs);
|
||||||
RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
|
RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
|
||||||
const teams = val.map((r) => {
|
const teams = val.map((r) => {
|
||||||
return { label: `${r.parentGroup.name} > ${r.name}`, value: `TEAM_${r.id}` };
|
return {
|
||||||
|
label: `${r.parentGroup.name} > ${r.name}`,
|
||||||
|
value: `TEAM_${r.id}`,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
groups = groups.concat(teams);
|
groups = groups.concat(teams);
|
||||||
});
|
});
|
||||||
@ -190,13 +194,13 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if import_modal_open}
|
{#if import_modal_open}
|
||||||
<div
|
<div
|
||||||
class="fixed z-10 inset-0 overflow-y-auto"
|
class="fixed z-10 inset-0 overflow-y-auto"
|
||||||
use:focusTrap
|
use:focusTrap
|
||||||
use:clickOutside
|
use:clickOutside
|
||||||
on:click_outside={() => {
|
on:click_outside={() => {
|
||||||
cancelModal();
|
cancelModal();
|
||||||
}}>
|
}}>
|
||||||
<div
|
<div
|
||||||
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
||||||
@ -349,6 +353,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
|
disabled={!importButtonEnabled}
|
||||||
|
class:opacity-50={!importButtonEnabled}
|
||||||
on:click={importAction}
|
on:click={importAction}
|
||||||
type="button"
|
type="button"
|
||||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
|
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user