foreman_patch 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +619 -0
- data/README.md +38 -0
- data/Rakefile +53 -0
- data/app/assets/javascript/foreman_patch/plan_edit_windows.js +9 -0
- data/app/assets/stylesheets/foreman_patch/cycle_plans.scss +6 -0
- data/app/assets/stylesheets/foreman_patch/foreman_patch.css +4 -0
- data/app/controllers/concerns/foreman_patch/parameters/ticket_field.rb +26 -0
- data/app/controllers/foreman_patch/api/v2/base_controller.rb +12 -0
- data/app/controllers/foreman_patch/api/v2/cycles_controller.rb +78 -0
- data/app/controllers/foreman_patch/api/v2/groups_controller.rb +70 -0
- data/app/controllers/foreman_patch/api/v2/host_groups_controller.rb +13 -0
- data/app/controllers/foreman_patch/api/v2/invocations_controller.rb +70 -0
- data/app/controllers/foreman_patch/api/v2/plans_controller.rb +79 -0
- data/app/controllers/foreman_patch/api/v2/rounds_controller.rb +77 -0
- data/app/controllers/foreman_patch/api/v2/window_plans_controller.rb +73 -0
- data/app/controllers/foreman_patch/api/v2/windows_controller.rb +85 -0
- data/app/controllers/foreman_patch/concerns/api/v2/hosts_controller_extensions.rb +21 -0
- data/app/controllers/foreman_patch/concerns/hosts_controller_extensions.rb +61 -0
- data/app/controllers/foreman_patch/cycles_controller.rb +34 -0
- data/app/controllers/foreman_patch/groups_controller.rb +68 -0
- data/app/controllers/foreman_patch/invocations_controller.rb +51 -0
- data/app/controllers/foreman_patch/plans_controller.rb +59 -0
- data/app/controllers/foreman_patch/rounds_controller.rb +18 -0
- data/app/controllers/foreman_patch/ticket_fields_controller.rb +37 -0
- data/app/controllers/foreman_patch/window_plans_controller.rb +60 -0
- data/app/controllers/foreman_patch/windows_controller.rb +58 -0
- data/app/helpers/concerns/foreman_patch/hosts_helper_extensions.rb +13 -0
- data/app/helpers/foreman_patch/cycles_helper.rb +19 -0
- data/app/helpers/foreman_patch/hosts_helper.rb +52 -0
- data/app/helpers/foreman_patch/patching_helper.rb +116 -0
- data/app/helpers/foreman_patch/plans_helper.rb +45 -0
- data/app/helpers/foreman_patch/ticket_helper.rb +11 -0
- data/app/helpers/foreman_patch/window_patching_helper.rb +20 -0
- data/app/helpers/foreman_patch/window_plans_helper.rb +13 -0
- data/app/helpers/foreman_patch/windows_helper.rb +17 -0
- data/app/lib/actions/foreman_patch/cycle/complete.rb +41 -0
- data/app/lib/actions/foreman_patch/cycle/create.rb +69 -0
- data/app/lib/actions/foreman_patch/cycle/initiate.rb +68 -0
- data/app/lib/actions/foreman_patch/cycle/plan.rb +73 -0
- data/app/lib/actions/foreman_patch/cycle/prepare_content.rb +123 -0
- data/app/lib/actions/foreman_patch/host/reschedule.rb +32 -0
- data/app/lib/actions/foreman_patch/invocation/action.rb +135 -0
- data/app/lib/actions/foreman_patch/invocation/ensure_services.rb +47 -0
- data/app/lib/actions/foreman_patch/invocation/patch.rb +93 -0
- data/app/lib/actions/foreman_patch/invocation/reschedule.rb +21 -0
- data/app/lib/actions/foreman_patch/invocation/restart.rb +101 -0
- data/app/lib/actions/foreman_patch/invocation/update_packages.rb +52 -0
- data/app/lib/actions/foreman_patch/invocation/wait_for_host.rb +103 -0
- data/app/lib/actions/foreman_patch/round/add_missing_hosts.rb +21 -0
- data/app/lib/actions/foreman_patch/round/create.rb +37 -0
- data/app/lib/actions/foreman_patch/round/patch.rb +81 -0
- data/app/lib/actions/foreman_patch/round/plan.rb +33 -0
- data/app/lib/actions/foreman_patch/round/resolve_hosts.rb +45 -0
- data/app/lib/actions/foreman_patch/window/create.rb +41 -0
- data/app/lib/actions/foreman_patch/window/patch.rb +72 -0
- data/app/lib/actions/foreman_patch/window/plan.rb +43 -0
- data/app/lib/actions/foreman_patch/window/publish.rb +32 -0
- data/app/lib/actions/foreman_patch/window/resolve_hosts.rb +31 -0
- data/app/lib/actions/helpers/failure_notification.rb +20 -0
- data/app/lib/actions/helpers/with_feature_action.rb +102 -0
- data/app/lib/actions/middleware/check_exit_status.rb +31 -0
- data/app/mailers/foreman_patch/cycle_mailer.rb +17 -0
- data/app/mailers/foreman_patch/group_mailer.rb +41 -0
- data/app/mailers/foreman_patch/invocation_mailer.rb +19 -0
- data/app/models/foreman_patch/concerns/group_facet_host_extensions.rb +35 -0
- data/app/models/foreman_patch/concerns/host_managed_extensions.rb +17 -0
- data/app/models/foreman_patch/cycle.rb +49 -0
- data/app/models/foreman_patch/group.rb +43 -0
- data/app/models/foreman_patch/host/group_facet.rb +13 -0
- data/app/models/foreman_patch/invocation.rb +60 -0
- data/app/models/foreman_patch/plan.rb +110 -0
- data/app/models/foreman_patch/plan_task_group.rb +11 -0
- data/app/models/foreman_patch/round.rb +68 -0
- data/app/models/foreman_patch/ticket_field.rb +23 -0
- data/app/models/foreman_patch/window.rb +123 -0
- data/app/models/foreman_patch/window_plan.rb +77 -0
- data/app/models/foreman_patch/window_task_group.rb +11 -0
- data/app/models/setting/patching.rb +57 -0
- data/app/services/foreman_patch/cycle_name_generator.rb +38 -0
- data/app/services/foreman_patch/ticket/affected_items.rb +110 -0
- data/app/services/foreman_patch/ticket/api.rb +68 -0
- data/app/services/foreman_patch/ticket/change_request.rb +92 -0
- data/app/services/foreman_patch/ticket/field_render.rb +21 -0
- data/app/services/foreman_patch/ticket/payload.rb +136 -0
- data/app/services/foreman_patch/ticket.rb +14 -0
- data/app/views/dashboard/_foreman_patch_widget.html.erb +2 -0
- data/app/views/foreman_patch/api/v2/cycles/base.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/cycles/create.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/cycles/index.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/cycles/show.json.rabl +9 -0
- data/app/views/foreman_patch/api/v2/cycles/update.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/group_facet/base.json.rabl +7 -0
- data/app/views/foreman_patch/api/v2/group_facet/base_with_root.json.rabl +4 -0
- data/app/views/foreman_patch/api/v2/group_facet/show.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/groups/base.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/groups/create.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/groups/index.json.rabl +2 -0
- data/app/views/foreman_patch/api/v2/groups/show.json.rabl +14 -0
- data/app/views/foreman_patch/api/v2/groups/update.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/invocations/base.json.rabl +6 -0
- data/app/views/foreman_patch/api/v2/invocations/index.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/invocations/phase.json.rabl +7 -0
- data/app/views/foreman_patch/api/v2/invocations/show.json.rabl +7 -0
- data/app/views/foreman_patch/api/v2/plans/base.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/plans/create.json.rabl +2 -0
- data/app/views/foreman_patch/api/v2/plans/index.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/plans/show.json.rabl +9 -0
- data/app/views/foreman_patch/api/v2/plans/update.json.rabl +2 -0
- data/app/views/foreman_patch/api/v2/rounds/base.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/rounds/index.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/rounds/show.json.rabl +17 -0
- data/app/views/foreman_patch/api/v2/rounds/status.json.rabl +11 -0
- data/app/views/foreman_patch/api/v2/window_plans/base.json.rabl +4 -0
- data/app/views/foreman_patch/api/v2/window_plans/create.json.rabl +2 -0
- data/app/views/foreman_patch/api/v2/window_plans/index.json.rabl +2 -0
- data/app/views/foreman_patch/api/v2/window_plans/show.json.rabl +14 -0
- data/app/views/foreman_patch/api/v2/window_plans/update.json.rabl +2 -0
- data/app/views/foreman_patch/api/v2/windows/base.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/windows/index.json.rabl +3 -0
- data/app/views/foreman_patch/api/v2/windows/schedule.json.rabl +13 -0
- data/app/views/foreman_patch/api/v2/windows/show.json.rabl +13 -0
- data/app/views/foreman_patch/api/v2/windows/update.json.rabl +3 -0
- data/app/views/foreman_patch/cycle_mailer/_details.html.erb +4 -0
- data/app/views/foreman_patch/cycle_mailer/_round.html.erb +12 -0
- data/app/views/foreman_patch/cycle_mailer/_summary.html.erb +6 -0
- data/app/views/foreman_patch/cycle_mailer/_window.html.erb +4 -0
- data/app/views/foreman_patch/cycle_mailer/planned.html.erb +7 -0
- data/app/views/foreman_patch/cycles/_form.html.erb +9 -0
- data/app/views/foreman_patch/cycles/edit.html.erb +41 -0
- data/app/views/foreman_patch/cycles/index.html.erb +45 -0
- data/app/views/foreman_patch/cycles/show.html.erb +26 -0
- data/app/views/foreman_patch/group_mailer/_dashboard.html.erb +31 -0
- data/app/views/foreman_patch/group_mailer/_list.html.erb +17 -0
- data/app/views/foreman_patch/group_mailer/completed.html.erb +16 -0
- data/app/views/foreman_patch/group_mailer/initiated.html.erb +4 -0
- data/app/views/foreman_patch/groups/_form.html.erb +9 -0
- data/app/views/foreman_patch/groups/edit.html.erb +3 -0
- data/app/views/foreman_patch/groups/index.html.erb +40 -0
- data/app/views/foreman_patch/groups/new.html.erb +3 -0
- data/app/views/foreman_patch/hosts/hosts/new_action.html.erb +1 -0
- data/app/views/foreman_patch/hosts/new_action.html.erb +1 -0
- data/app/views/foreman_patch/invocation_mailer/_output_line_set.html.erb +6 -0
- data/app/views/foreman_patch/invocation_mailer/_output_line_set.text.erb +3 -0
- data/app/views/foreman_patch/invocation_mailer/failure.html.erb +50 -0
- data/app/views/foreman_patch/invocation_mailer/failure.text.erb +10 -0
- data/app/views/foreman_patch/invocations/_output_line_set.html.erb +8 -0
- data/app/views/foreman_patch/invocations/_phase.html.erb +17 -0
- data/app/views/foreman_patch/invocations/_primary.html.erb +1 -0
- data/app/views/foreman_patch/invocations/_refresh.js.erb +7 -0
- data/app/views/foreman_patch/invocations/show.html.erb +44 -0
- data/app/views/foreman_patch/invocations/show.js.erb +17 -0
- data/app/views/foreman_patch/layouts/react.html.erb +17 -0
- data/app/views/foreman_patch/plans/_form.html.erb +12 -0
- data/app/views/foreman_patch/plans/edit.html.erb +6 -0
- data/app/views/foreman_patch/plans/index.html.erb +32 -0
- data/app/views/foreman_patch/plans/new.html.erb +3 -0
- data/app/views/foreman_patch/plans/show.html.erb +19 -0
- data/app/views/foreman_patch/rounds/show.html.erb +54 -0
- data/app/views/foreman_patch/ticket_fields/_fields.html.erb +66 -0
- data/app/views/foreman_patch/ticket_fields/edit.html.erb +6 -0
- data/app/views/foreman_patch/ticket_fields/index.html.erb +26 -0
- data/app/views/foreman_patch/ticket_fields/new.html.erb +6 -0
- data/app/views/foreman_patch/window_plans/_form.html.erb +11 -0
- data/app/views/foreman_patch/window_plans/_hidden_layout.html.erb +7 -0
- data/app/views/foreman_patch/window_plans/edit.html.erb +3 -0
- data/app/views/foreman_patch/window_plans/new.html.erb +3 -0
- data/app/views/foreman_patch/windows/_form.html.erb +21 -0
- data/app/views/foreman_patch/windows/_groups.html.erb +2 -0
- data/app/views/foreman_patch/windows/_rounds.html.erb +24 -0
- data/app/views/foreman_patch/windows/_schedule.html.erb +16 -0
- data/app/views/foreman_patch/windows/_ticket.html.erb +12 -0
- data/app/views/foreman_patch/windows/edit.html.erb +3 -0
- data/app/views/foreman_patch/windows/new.html.erb +3 -0
- data/app/views/foreman_patch/windows/show.html.erb +27 -0
- data/app/views/foreman_patch/windows/show.json.erb +4 -0
- data/app/views/hosts/select_multiple_patch_group.html.erb +12 -0
- data/app/views/overrides/patch_groups/_host_patch_group_select.html.erb +9 -0
- data/app/views/templates/ensure_services.erb +28 -0
- data/config/api_routes.rb +37 -0
- data/config/initializers/pagelets.rb +6 -0
- data/config/initializers/safemode_jail.rb +4 -0
- data/config/routes/mount_engine.rb +3 -0
- data/config/routes/overrides.rb +10 -0
- data/config/routes.rb +47 -0
- data/db/migrate/20210202161304_create_foreman_patch_plans.rb +32 -0
- data/db/migrate/20210202163323_create_foreman_patch_cycles.rb +38 -0
- data/db/migrate/20210202164301_create_foreman_patch_groups.rb +37 -0
- data/db/migrate/20210226134103_add_name_to_cycles.rb +31 -0
- data/db/migrate/20210226162824_rename_default_window.rb +5 -0
- data/db/migrate/20210302165058_add_task_to_window_groups.rb +7 -0
- data/db/migrate/20210304141111_create_invocation.rb +16 -0
- data/db/migrate/20210519163923_add_cycle_end_date.rb +29 -0
- data/db/migrate/20210525154113_expand_window_groups.rb +27 -0
- data/db/migrate/20210723160142_add_cycle_plan_task_group.rb +7 -0
- data/db/migrate/20210831160044_cycle_plan_start_correction.rb +5 -0
- data/db/migrate/20210907104645_rename_group_priority.rb +5 -0
- data/db/migrate/20210909130118_remove_old_references.rb +14 -0
- data/db/migrate/20210910141428_rename_round.rb +7 -0
- data/db/migrate/20210910163542_rename_plan.rb +8 -0
- data/db/migrate/20211014212415_round_group_reference.rb +9 -0
- data/db/migrate/20220105224803_add_group_label.rb +25 -0
- data/db/migrate/20220114153808_plan_add_name_generator.rb +5 -0
- data/db/migrate/20220117103808_remove_cycle_description.rb +5 -0
- data/db/migrate/20220406110705_add_window_state.rb +37 -0
- data/db/migrate/20220407161120_add_round_status.rb +9 -0
- data/db/migrate/20220902134800_add_invocation_status.rb +28 -0
- data/db/seeds.d/100-assign_features_with_templates.rb +16 -0
- data/db/seeds.d/160-mail_notifications.rb +38 -0
- data/db/seeds.d/75-job_templates.rb +16 -0
- data/lib/foreman_patch/engine.rb +87 -0
- data/lib/foreman_patch/plugin.rb +47 -0
- data/lib/foreman_patch/version.rb +3 -0
- data/lib/foreman_patch.rb +4 -0
- data/lib/tasks/foreman_patch_tasks.rake +47 -0
- data/locale/Makefile +60 -0
- data/locale/en/foreman_patch.po +19 -0
- data/locale/foreman_patch.pot +19 -0
- data/locale/gemspec.rb +2 -0
- data/package.json +35 -0
- data/public/assets/foreman_patch/cycle_plans-e5667e178ba389908f5c815b24ec0ea77c340849d56bc39c5ce72bb626bd446a.scss +6 -0
- data/public/assets/foreman_patch/cycle_plans-e5667e178ba389908f5c815b24ec0ea77c340849d56bc39c5ce72bb626bd446a.scss.gz +0 -0
- data/public/assets/foreman_patch/foreman_patch-ce5805a60c0d5f896f557ff5246e5a09172043004c850b39bea54e618df1c485.css +1 -0
- data/public/assets/foreman_patch/foreman_patch-ce5805a60c0d5f896f557ff5246e5a09172043004c850b39bea54e618df1c485.css.gz +0 -0
- data/public/assets/foreman_patch/foreman_patch.json +1 -0
- data/public/assets/foreman_patch/plan_edit_windows-e656ba411642a7f983b51958ab30ac49c056322d19295a603cff4d5e6c71c8ed.js +1 -0
- data/public/assets/foreman_patch/plan_edit_windows-e656ba411642a7f983b51958ab30ac49c056322d19295a603cff4d5e6c71c8ed.js.gz +0 -0
- data/public/webpack/foreman_patch/bundle-200e97f4e2ad9ed413ea.css +1 -0
- data/public/webpack/foreman_patch/bundle-200e97f4e2ad9ed413ea.css.gz +0 -0
- data/public/webpack/foreman_patch/bundle-200e97f4e2ad9ed413ea.js +6 -0
- data/public/webpack/foreman_patch/bundle-200e97f4e2ad9ed413ea.js.gz +0 -0
- data/public/webpack/foreman_patch/bundle-200e97f4e2ad9ed413ea.js.map +1 -0
- data/public/webpack/foreman_patch/bundle-200e97f4e2ad9ed413ea.js.map.gz +0 -0
- data/public/webpack/foreman_patch/foreman_patch-1e4f2d5e6f040a27aa7a.css +1 -0
- data/public/webpack/foreman_patch/foreman_patch-1e4f2d5e6f040a27aa7a.css.gz +0 -0
- data/public/webpack/foreman_patch/foreman_patch-1e4f2d5e6f040a27aa7a.js +6 -0
- data/public/webpack/foreman_patch/foreman_patch-1e4f2d5e6f040a27aa7a.js.gz +0 -0
- data/public/webpack/foreman_patch/foreman_patch-1e4f2d5e6f040a27aa7a.js.map +1 -0
- data/public/webpack/foreman_patch/foreman_patch-1e4f2d5e6f040a27aa7a.js.map.gz +0 -0
- data/public/webpack/foreman_patch/manifest.json +26 -0
- data/public/webpack/foreman_patch/manifest.json.gz +0 -0
- data/public/webpack/foreman_patch/vendor-4b77c91f1e9103179596.js +2 -0
- data/public/webpack/foreman_patch/vendor-4b77c91f1e9103179596.js.gz +0 -0
- data/public/webpack/foreman_patch/vendor-4b77c91f1e9103179596.js.map +1 -0
- data/public/webpack/foreman_patch/vendor-4b77c91f1e9103179596.js.map.gz +0 -0
- data/test/factories/foreman_patch_factories.rb +5 -0
- data/test/test_plugin_helper.rb +6 -0
- data/test/unit/foreman_patch_test.rb +11 -0
- data/webpack/components/Cycle/Cycle.js +57 -0
- data/webpack/components/Cycle/CycleActions.js +21 -0
- data/webpack/components/Cycle/CycleConstants.js +2 -0
- data/webpack/components/Cycle/CycleHelpers.js +3 -0
- data/webpack/components/Cycle/CycleSelectors.js +10 -0
- data/webpack/components/Cycle/Window.js +32 -0
- data/webpack/components/Cycle/index.js +41 -0
- data/webpack/components/Groups/Group.js +20 -0
- data/webpack/components/Groups/Groups.js +46 -0
- data/webpack/components/Groups/GroupsHelpers.js +11 -0
- data/webpack/components/Groups/Priority.js +51 -0
- data/webpack/components/Invocation/Invocation.js +47 -0
- data/webpack/components/Invocation/InvocationActions.js +8 -0
- data/webpack/components/Invocation/InvocationConsts.js +1 -0
- data/webpack/components/Invocation/InvocationSelectors.js +14 -0
- data/webpack/components/Invocation/index.js +36 -0
- data/webpack/components/Invocations/Invocations.js +55 -0
- data/webpack/components/Invocations/InvocationsConstants.js +1 -0
- data/webpack/components/Invocations/InvocationsHelpers.js +11 -0
- data/webpack/components/Invocations/InvocationsPage.js +66 -0
- data/webpack/components/Invocations/InvocationsPage.scss +3 -0
- data/webpack/components/Invocations/InvocationsSelectors.js +21 -0
- data/webpack/components/Invocations/components/InvocationItem.js +66 -0
- data/webpack/components/Invocations/components/InvocationStatus.js +51 -0
- data/webpack/components/Invocations/index.js +99 -0
- data/webpack/components/Plan/Plan.js +90 -0
- data/webpack/components/Plan/PlanActions.js +12 -0
- data/webpack/components/Plan/PlanConstants.js +1 -0
- data/webpack/components/Plan/PlanSelectors.js +9 -0
- data/webpack/components/Plan/Window.js +33 -0
- data/webpack/components/Plan/index.js +36 -0
- data/webpack/components/PlanWindow/PlanWindow.js +55 -0
- data/webpack/components/PlanWindow/index.js +32 -0
- data/webpack/components/RoundProgress/AggregateStatus.js +58 -0
- data/webpack/components/RoundProgress/RoundProgress.js +48 -0
- data/webpack/components/RoundProgress/RoundProgressActions.js +9 -0
- data/webpack/components/RoundProgress/RoundProgressConstants.js +1 -0
- data/webpack/components/RoundProgress/RoundProgressSelectors.js +24 -0
- data/webpack/components/RoundProgress/index.js +44 -0
- data/webpack/components/Rounds/Rounds.js +57 -0
- data/webpack/components/Rounds/RoundsActions.js +8 -0
- data/webpack/components/Rounds/RoundsConsts.js +1 -0
- data/webpack/components/Rounds/RoundsSelectors.js +14 -0
- data/webpack/components/Rounds/components/RoundItem.js +52 -0
- data/webpack/components/Rounds/components/RoundStatus.js +40 -0
- data/webpack/components/Rounds/index.js +37 -0
- data/webpack/components/common/Calendar/Calendar.js +86 -0
- data/webpack/components/common/Calendar/Calendar.scss +76 -0
- data/webpack/components/common/Calendar/CalendarConstants.js +1 -0
- data/webpack/components/common/Calendar/CalendarHelpers.js +77 -0
- data/webpack/components/common/Calendar/Day/index.js +9 -0
- data/webpack/components/common/Calendar/Event.js +25 -0
- data/webpack/components/common/Calendar/Month/Day.js +51 -0
- data/webpack/components/common/Calendar/Month/Header.js +77 -0
- data/webpack/components/common/Calendar/Month/Month.js +47 -0
- data/webpack/components/common/Calendar/Month/index.js +1 -0
- data/webpack/components/common/Calendar/View.js +20 -0
- data/webpack/components/common/Calendar/Week/index.js +13 -0
- data/webpack/components/common/Calendar/index.js +2 -0
- data/webpack/components/common/Terminal/OutputLine.js +26 -0
- data/webpack/components/common/Terminal/Terminal.js +115 -0
- data/webpack/components/common/Terminal/Terminal.scss +47 -0
- data/webpack/index.js +20 -0
- metadata +438 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
<% title _("Patch Cycles") %>
|
2
|
+
|
3
|
+
<table class="<%= table_css_classes 'table-condensed table-fixed' %>">
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th><%= sort :name, as: _('Name') %></th>
|
7
|
+
<th class="col-md-2"><%= sort :start_date, as: _('Start Date') %></th>
|
8
|
+
<th class="col-md-1"><%= _('Planned') %></th>
|
9
|
+
<th class="col-md-1"><%= _('Scheduled') %></th>
|
10
|
+
<th class="col-md-1"><%= _('Running') %></th>
|
11
|
+
<th class="col-md-1"><%= _('Completed') %></th>
|
12
|
+
<th class="col-md-1"><%= _('Total Windows') %></th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody>
|
16
|
+
<% @cycles.each do |cycle| %>
|
17
|
+
<tr>
|
18
|
+
<td>
|
19
|
+
<%= link_to cycle.name, cycle_path(cycle) %>
|
20
|
+
</td>
|
21
|
+
<td>
|
22
|
+
<%= cycle.start_date %>
|
23
|
+
</td>
|
24
|
+
<td>
|
25
|
+
<%= cycle.windows.planned.count %>
|
26
|
+
</td>
|
27
|
+
<td>
|
28
|
+
<%= cycle.windows.scheduled.count %>
|
29
|
+
</td>
|
30
|
+
<td>
|
31
|
+
<%= cycle.windows.running.count %>
|
32
|
+
</td>
|
33
|
+
<td>
|
34
|
+
<%= cycle.windows.completed.count %>
|
35
|
+
</td>
|
36
|
+
<td>
|
37
|
+
<%= cycle.windows.count %>
|
38
|
+
</td>
|
39
|
+
</tr>
|
40
|
+
<% end %>
|
41
|
+
</tbody>
|
42
|
+
</table>
|
43
|
+
|
44
|
+
<%= will_paginate_with_info @cycles %>
|
45
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<% content_for(:javascripts) do %>
|
2
|
+
<%= webpacked_plugins_js_for :foreman_patch %>
|
3
|
+
<% end %>
|
4
|
+
<% content_for(:stylesheets) do %>
|
5
|
+
<%= webpacked_plugins_css_for :foreman_patch %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% title @cycle.name %>
|
9
|
+
|
10
|
+
<%
|
11
|
+
items = [{ caption: _('Patch Cycles'), url: cycles_path },
|
12
|
+
{ caption: @cycle.name }]
|
13
|
+
|
14
|
+
breadcrumbs(resource_url: api_cycles_path,
|
15
|
+
name_field: 'name',
|
16
|
+
switcher_item_url: cycle_path(':id'),
|
17
|
+
items: items)
|
18
|
+
%>
|
19
|
+
|
20
|
+
<% title_actions link_to(_('Create Window'), hash_for_new_cycle_window_path(cycle_id: @cycle.id),
|
21
|
+
class: 'btn btn-default',
|
22
|
+
disabled: @cycle.end_date.past?,
|
23
|
+
title: _('Create a new window for this cycle'))
|
24
|
+
%>
|
25
|
+
|
26
|
+
<%= react_component('Cycle', id: @cycle.id) %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<table class="center">
|
2
|
+
<tbody>
|
3
|
+
<tr>
|
4
|
+
<td class="dashboard">
|
5
|
+
<%= (n_('<b style="color: #6bb5df;">%{hosts_sum}</b>
|
6
|
+
<p>Host</p>',
|
7
|
+
'<b style="color: #6bb5df;">%{hosts_sum}</b>
|
8
|
+
<p>Hosts</p>', hosts_sum) % {hosts_sum: hosts_sum}).html_safe %>
|
9
|
+
</td>
|
10
|
+
<td class="dashboard">
|
11
|
+
<%= (n_('<b style="color: #6bb5df;">%{hosts_sum}</b>
|
12
|
+
<p>Success</p>',
|
13
|
+
'<b style="color: #6bb5df;">%{hosts_sum}</b>
|
14
|
+
<p>Successes</p>', successes_sum) % {hosts_sum: successes_sum}).html_safe %>
|
15
|
+
</td>
|
16
|
+
<td class="dashboard">
|
17
|
+
<%= (n_('<b style="color: #6bb5df;">%{hosts_sum}</b>
|
18
|
+
<p>Warning</p>',
|
19
|
+
'<b style="color: #6bb5df;">%{hosts_sum}</b>
|
20
|
+
<p>Warnings</b>', warnings_sum) % {hosts_sum: warnings_sum}).html_safe %>
|
21
|
+
</td>
|
22
|
+
<td class="dashboard">
|
23
|
+
<%= (n_('<b style="color: #6bb5df;">%{hosts_sum}</b>
|
24
|
+
<p>Failure</p>',
|
25
|
+
'<b style="color: #6bb5df;">%{hosts_sum}</b>
|
26
|
+
<p>Failures</p>', failures_sum) % {hosts_sum: failures_sum}).html_safe %>
|
27
|
+
</td>
|
28
|
+
</tr>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
31
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="host-list">
|
2
|
+
<h2><%= title %></h2>
|
3
|
+
<% if list.size > 0 %>
|
4
|
+
<table>
|
5
|
+
<% list.each_slice(4) do |row| %>
|
6
|
+
<tr>
|
7
|
+
<% row.each do |host| %>
|
8
|
+
<td class="hosts-rows"><%= host %></td>
|
9
|
+
<% end %>
|
10
|
+
</tr>
|
11
|
+
<% end %>
|
12
|
+
</table>
|
13
|
+
<p class="total"><%= n_('Total of one host', 'Total of %{hosts} hosts', list.size) % {hosts: list.size} %></p>
|
14
|
+
<% else %>
|
15
|
+
<b><%= _('None!') %></b>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% content_for(:head) do %>
|
2
|
+
<style>
|
3
|
+
td.dashboard {
|
4
|
+
width: 25%;
|
5
|
+
}
|
6
|
+
</style>
|
7
|
+
<% end %>
|
8
|
+
<h2 class="headline"><%= (_('Patching Completed for <b>%{group}</b>') % {group: @group}).html_safe %></h2>
|
9
|
+
<div class="dashboard">
|
10
|
+
<%= render partial: 'dashboard', locals: {hosts_sum: @total, successes_sum: @successes.size, warnings_sum: @warnings.size, failures_sum: @failures.size} %>
|
11
|
+
</div>
|
12
|
+
<div class="hosts">
|
13
|
+
<%= render partial: 'list', locals: {title: _("Hosts successfully patched"), list: @successes} %>
|
14
|
+
<%= render partial: 'list', locals: {title: _("Hosts with services that need intervention"), list: @warnings} %>
|
15
|
+
<%= render partial: 'list', locals: {title: _("Hosts which failed to fully patch"), list: @failures} %>
|
16
|
+
</div>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_for @group, as: :group do |f| %>
|
2
|
+
<%= base_errors_for @group %>
|
3
|
+
<%= text_f f, :name %>
|
4
|
+
<%= textarea_f f, :description %>
|
5
|
+
<%= selectable_f f, :default_window_plan_id, ForemanPatch::WindowPlan.all.collect { |c| [c.name, c.id] }, { include_blank: true }, { label: _('Default Window Plan'), required: false } %>
|
6
|
+
<%= text_f f, :max_unavailable %>
|
7
|
+
|
8
|
+
<%= submit_or_cancel f, false, {cancel_path: groups_path} %>
|
9
|
+
<% end %>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<% title _("Patch Groups") %>
|
2
|
+
|
3
|
+
<% title_actions csv_link, link_to(_("Create Patch Group"), hash_for_new_group_path, class: 'btn btn-default') %>
|
4
|
+
|
5
|
+
<table class="<%= table_css_classes 'table-fixed' %>">
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th width="35%"><%= sort :name, as: _('Name') %></th>
|
9
|
+
<th class="hidden-xs" width="25%"><%= sort :label, as: _('Label') %></th>
|
10
|
+
<th class="hidden-xs ellipsis" width="30%"><%= sort :default_window, as: _('Default Window') %></th>
|
11
|
+
<th class="hidden-xs" width="10%"><%= _('Hosts') %></th>
|
12
|
+
<th width="100px"><%= _('Actions') %></th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody>
|
16
|
+
<% @groups.each do |group| %>
|
17
|
+
<tr>
|
18
|
+
<td class="ellipsis">
|
19
|
+
<%= link_to group.name, edit_group_path(group) %>
|
20
|
+
</td>
|
21
|
+
<td class="hidden-xs ellipsis">
|
22
|
+
<%= group.label %>
|
23
|
+
</td>
|
24
|
+
<td class="hidden-xs ellipsis">
|
25
|
+
<%= group.default_window_plan.name %>
|
26
|
+
</td>
|
27
|
+
<td class="hidden-xs">
|
28
|
+
<%= link_to group.hosts.count, main_app.hosts_path(search: %Q[patch_group = "#{group.name}"]) %>
|
29
|
+
</td>
|
30
|
+
<td>
|
31
|
+
<%= action_buttons(
|
32
|
+
display_delete_if_authorized(hash_for_group_path(id: group.id).merge(auth_object: group, authorizer: authorizer), data: { confirm: _("Delete patch group, %s?") % group.name })) %>
|
33
|
+
</td>
|
34
|
+
</tr>
|
35
|
+
<% end %>
|
36
|
+
</tbody>
|
37
|
+
</table>
|
38
|
+
|
39
|
+
<%= will_paginate_with_info @groups %>
|
40
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
Welcome to <b>ForemanPatch</b>
|
@@ -0,0 +1 @@
|
|
1
|
+
Welcome to <b>ForemanPatch</b>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<% output_line_set['output'].gsub("\r\n", "\n").sub(/\n\Z/, '').split("\n", -1).each do |line| %>
|
2
|
+
<%= content_tag :div, class: 'line ' + output_line_set['output_type'], data: { timestamp: output_line_set['timestamp'] } do %>
|
3
|
+
<%= content_tag(:span, (@line_counter += 1).to_s.rjust(4).gsub(' ', ' ').html_safe + ':', class: 'counter', title: (output_line_set['timestamp'] && Time.at(output_line_set['timestamp'].to_f))) %>
|
4
|
+
<%= content_tag(:div, colorize_line(line.gsub(JobInvocationOutputHelper::COLOR_PATTERN, '').empty? ? "#{line}\n" : line).html_safe, class: 'content') %>
|
5
|
+
<% end %>
|
6
|
+
<% end %>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<% content_for(:head) do %>
|
2
|
+
<style>
|
3
|
+
div.printable {
|
4
|
+
display: block;
|
5
|
+
padding: 9.5px;
|
6
|
+
margin: 0 0 10px;
|
7
|
+
font-size: 12px;
|
8
|
+
word-break: break-all;
|
9
|
+
word-wrap: break-word;
|
10
|
+
color: rgba(255, 255, 255, 1);
|
11
|
+
background-color: rgba(47, 47, 47, 1);
|
12
|
+
border: 1px solid #000000;
|
13
|
+
border-radius: 0px;
|
14
|
+
font-family: Menlo, Monaco, Consolas, monospace;
|
15
|
+
min-height: 50px;
|
16
|
+
}
|
17
|
+
|
18
|
+
div.line.stderr, div.line.error, div.line.debug {
|
19
|
+
color: red;
|
20
|
+
}
|
21
|
+
|
22
|
+
div.line span.counter {
|
23
|
+
float: left;
|
24
|
+
clear: left;
|
25
|
+
}
|
26
|
+
|
27
|
+
div.line div.content {
|
28
|
+
position: relative;
|
29
|
+
margin-left: 50px;
|
30
|
+
white-space: pre-wrap;
|
31
|
+
}
|
32
|
+
</style>
|
33
|
+
<% end %>
|
34
|
+
<h2 class="headline"><%= _("Patching Failure").html_safe %></h2>
|
35
|
+
<div class="dashboard">
|
36
|
+
<table>
|
37
|
+
<tr>
|
38
|
+
<td width="18%" class="hosts-rows"><b><%= _("Hostname") %></b></td>
|
39
|
+
<td width="82%" class="hosts-rows"><%= link_to @host.name, main_app.host_path(@host) %></td>
|
40
|
+
</tr>
|
41
|
+
<tr>
|
42
|
+
<td width="18%" class="hosts-rows"><b><%= _("IP") %></b></td>
|
43
|
+
<td width="82%" class="hosts-rows"><%= @host.ip %></td>
|
44
|
+
</tr>
|
45
|
+
</table>
|
46
|
+
</div>
|
47
|
+
<div class="printable">
|
48
|
+
<%= render partial: 'template_invocations/output_line_set', collection: normalize_line_sets(@output) %>
|
49
|
+
</div>
|
50
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= _("The patching of a host has failed.") %>
|
2
|
+
|
3
|
+
<%= _("Hostname:") %> <%= @host.fqdn %>
|
4
|
+
<%= _("IP:") %> <%= @host.ip %>
|
5
|
+
|
6
|
+
<%= _("View in Foreman:") %>
|
7
|
+
<%= main_app.host_url(id: @host) %>
|
8
|
+
|
9
|
+
<%= _("Output: ") %>
|
10
|
+
<% render partial: 'output_line_set', collection: normalize_line_sets(@output) %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% output_line_set['output'].gsub("\r\n", "\n").sub(/\n\Z/, '').split("\n", -1).each do |line| %>
|
2
|
+
<div class="line <%= output_line_set['output_type'] %>" data-timestamp="<%= output_line_set['timestamp'] %>">
|
3
|
+
<span class="counter" title data-original-title="<%= Time.at(output_line_set['timestamp'].to_f) %>"><%= (@line_counter += 1).to_s.rjust(4).gsub(' ', ' ').html_safe %>:</span>
|
4
|
+
<div class="content">
|
5
|
+
<span style="color: default"><%= line %></span>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% phase_tag_id = phase.label.demodulize.underscore %>
|
2
|
+
<div class="tab-pane" id="<%= phase_tag_id %>">
|
3
|
+
<div id="<%= phase_tag_id %>" class="terminal" data-refresh-url="<%= invocation_path(@invocation) %>">
|
4
|
+
<% if @error %>
|
5
|
+
<div class="line error"><%= @error %></div>
|
6
|
+
<% else %>
|
7
|
+
<%= link_to_function(_('Scroll to bottom'), '$("html, body").animate({ scrollTop: $(document).height() }, "slow");', class: 'pull-right scroll-link-bottom') %>
|
8
|
+
|
9
|
+
<div class="printable">
|
10
|
+
<% @line_counter = 0 %>
|
11
|
+
<%= render partial: 'template_invocations/output_line_set', collection: normalize_line_sets(phase.live_output) %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<%= link_to_function(_('Scroll to top'), '$("html, body").animate({ scrollTop: 0 }, "slow");', :class => 'pull-right scroll-link-top') %>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
TODO
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<%
|
2
|
+
items = [{ caption: _('Patch Cycles'), url: cycles_path },
|
3
|
+
{ caption: @cycle.name, url: cycle_path(@cycle) },
|
4
|
+
{ caption: @window.name, url: window_path(@window) },
|
5
|
+
{ caption: @round.name, url: round_path(@round) },
|
6
|
+
{ caption: _('Patching Invocation for %s') % @host.name }]
|
7
|
+
|
8
|
+
breadcrumbs(resource_url: api_round_invocations_path(@round.id),
|
9
|
+
name_field: 'host_name',
|
10
|
+
switcher_item_url: invocation_path(':id'),
|
11
|
+
items: items)
|
12
|
+
%>
|
13
|
+
|
14
|
+
<% stylesheet 'foreman_remote_execution/foreman_remote_execution' %>
|
15
|
+
<% javascript 'foreman_remote_execution/template_invocation' %>
|
16
|
+
|
17
|
+
<%=
|
18
|
+
title_actions(link_to(_('Back to Group'), round_path(@round), class: 'btn btn-default'),
|
19
|
+
button_group(link_to_function(_('Toggle STDERR'), '$("div.line.stderr").toggle()', class: 'btn btn-default'),
|
20
|
+
link_to_function(_('Toggle STDOUT'), '$("div.line.stdout").toggle()', class: 'btn btn-default'),
|
21
|
+
link_to_function(_('Toggle DEBUG'), '$("div.line.debug").toggle()', class: 'btn btn-default')),
|
22
|
+
button_group(invocation_task_buttons(@invocation.task, @invocation)))
|
23
|
+
%>
|
24
|
+
|
25
|
+
<ul class="nav nav-tabs" data="tabs">
|
26
|
+
<li class="active"><a href="#primary" data-toggle="tab"><%= _('Primary') %></a></li>
|
27
|
+
<% @invocation.phases.each do |phase| %>
|
28
|
+
<li><a href="#<%= phase.class.name.demodulize.underscore %>" data-toggle="tab"><%= phase.humanized_name.titlecase %></a></li>
|
29
|
+
<% end %>
|
30
|
+
</ul>
|
31
|
+
|
32
|
+
<div class="tab-content">
|
33
|
+
<div class="tab-pane active" id="primary">
|
34
|
+
<%= render partial: 'primary' %>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<% @invocation.phases.each do |phase| %>
|
38
|
+
<%= render partial: 'phase', locals: { phase: phase } %>
|
39
|
+
<% end %>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<script>
|
43
|
+
<%= render partial: 'refresh.js' %>
|
44
|
+
</script>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
var scrolledToBottom = (($(window).scrollTop() + $(window).height() == $(document).height()) && $("div.tab-pane#<%= @phase %>").hasClass("active"));
|
2
|
+
|
3
|
+
var lines = '<%=j render partial: 'output_line_set', collection: @line_sets %>'
|
4
|
+
var target = $("div.terminal#<%= @phase %> div.pritable");
|
5
|
+
|
6
|
+
<% if @since %>
|
7
|
+
target.append(lines);
|
8
|
+
<% else %>
|
9
|
+
target.html(lines);
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render partial: 'refresh.js' %>
|
13
|
+
|
14
|
+
if (scrolledToBottom) {
|
15
|
+
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
|
16
|
+
}
|
17
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% content_for(:stylesheets) do %>
|
2
|
+
<%= webpacked_plugins_css_for :foreman_patch %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for(:javascripts) do %>
|
6
|
+
<%= webpacked_plugins_js_for :foreman_patch %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<% content_for(:content) do %>
|
10
|
+
<% notifications %>
|
11
|
+
<div id="organization-id" data-id="<%= Organization.current.id if Organization.current %>"></div>
|
12
|
+
<div id="user-id" data-id="<%= User.current.id if User.current %>"></div>
|
13
|
+
<%= react_component('ForemanPatch') %>
|
14
|
+
<% end %>
|
15
|
+
<%= render file: "layouts/base" %>
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= form_for @plan do |f| %>
|
2
|
+
<%= base_errors_for @plan %>
|
3
|
+
<%= text_f f, :name %>
|
4
|
+
<%= textarea_f f, :description %>
|
5
|
+
<%= text_f f, :cycle_name %>
|
6
|
+
<%= date_local_f f, :start_date, { weekStartsOn: 0, required: true } %>
|
7
|
+
<%= number_f f, :interval %>
|
8
|
+
<%= selectable_f f, :units, ForemanPatch::Plan::UNITS, {} %>
|
9
|
+
<%= number_f f, :active_count %>
|
10
|
+
|
11
|
+
<%= submit_or_cancel f, false, { cancel_path: (@plan.new_record? ? plans_path : plan_path(@plan)) } %>
|
12
|
+
<% end %>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<% title _("Plans") %>
|
2
|
+
|
3
|
+
<% title_actions link_to(_("Create Plan"), hash_for_new_plan_path, class: 'btn btn-default') %>
|
4
|
+
|
5
|
+
<table class="<%= table_css_classes 'table-fixed' %>">
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th class="col-md-2"><%= sort :name, as: s_("Cycle Plan|Name") %></th>
|
9
|
+
<th class="col-md-3"><%= sort :description, as: _("Description") %></th>
|
10
|
+
<th class="col-md-1"><%= sort :start_date, as: _("Start Date") %></th>
|
11
|
+
<th class="col-md-1"><%= _("Interval") %></th>
|
12
|
+
<th class="col-md-1"><%= _("Active Cycles") %></th>
|
13
|
+
<th class="col-md-1"><%= _("Cycles") %></th>
|
14
|
+
<th class="col-md-1"><%= _("Actions") %></th>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
<tbody>
|
18
|
+
<% @plans.each do |plan| %>
|
19
|
+
<tr>
|
20
|
+
<td class="ellipsis"><%= link_to plan.name, plan_path(plan) %></td>
|
21
|
+
<td class="ellipsis"><%= plan.description %></td>
|
22
|
+
<td><%= plan.start_date %></td>
|
23
|
+
<td><%= n_("Every one %{singular}", "Every %{count} %{plural}", plan.interval) % {count: plan.interval, singular: plan.units.singularize, plural: plan.units } %></td>
|
24
|
+
<td><%= link_to plan.cycles.active.count, cycles_path(search: %Q[end_date >= #{Date.current}]) %></td>
|
25
|
+
<td><%= link_to plan.cycles.count, cycles_path(search: %Q[plan = "#{plan.name}"]) %></td>
|
26
|
+
<td>TODO</td>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
31
|
+
<%= will_paginate_with_info @plans %>
|
32
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% content_for(:javascripts) do %>
|
2
|
+
<%= webpacked_plugins_js_for :foreman_patch %>
|
3
|
+
<% end %>
|
4
|
+
<% content_for(:stylesheets) do %>
|
5
|
+
<%= webpacked_plugins_css_for :foreman_patch %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<% breadcrumbs(resource_url: api_plans_path,
|
9
|
+
name_field: 'name',
|
10
|
+
switcher_item_url: plan_path(':id'),
|
11
|
+
items: [
|
12
|
+
{ caption: _('Patching Plans'), url: plans_path },
|
13
|
+
{ caption: @plan.name }
|
14
|
+
])
|
15
|
+
%>
|
16
|
+
|
17
|
+
<% title_actions(plan_actions(@plan)) %>
|
18
|
+
|
19
|
+
<%= react_component('Plan', id: @plan.id) %>
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<% javascript *webpack_asset_paths('foreman_patch', extension: 'js') %>
|
2
|
+
<% content_for(:stylesheets) do %>
|
3
|
+
<%= webpacked_plugins_css_for :foreman_patch %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<%
|
7
|
+
items = [{ caption: _('Cycles'), url: cycles_path },
|
8
|
+
{ caption: @round.cycle.name, url: cycle_path(@round.cycle) },
|
9
|
+
{ caption: @round.window.name, url: window_path(@round.window) },
|
10
|
+
{ caption: @round.name }]
|
11
|
+
|
12
|
+
breadcrumbs(resource_url: api_window_rounds_path(@round.window.id),
|
13
|
+
name_field: 'name',
|
14
|
+
switcher_item_url: round_path(':id'),
|
15
|
+
items: items)
|
16
|
+
%>
|
17
|
+
|
18
|
+
<% if @round.task %>
|
19
|
+
<% title_actions button_group(round_task_buttons(@round.task))%>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<div class="row">
|
23
|
+
<div class="col-xs-6 col-sm-6 col-md-6">
|
24
|
+
<div class="card-pf card-pf-accented">
|
25
|
+
<div class="card-pf-title">
|
26
|
+
<h2 style="height: 18px;" class="card-pf-title"><%= _('Details') %></h2>
|
27
|
+
</div>
|
28
|
+
<div class="card-pf-body">
|
29
|
+
<p>
|
30
|
+
<%= _('Name:') %>
|
31
|
+
<strong><%= @round.name %></strong>
|
32
|
+
</p>
|
33
|
+
<p>
|
34
|
+
<%= _('Description:') %>
|
35
|
+
<strong><%= @round.description %></strong>
|
36
|
+
</p>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
<div class="col-xs-12 col-sm-6 col-md-6">
|
41
|
+
<div class="card-pf card-pf-accented card-pf-aggregate-status">
|
42
|
+
<div class="card-pf-title">
|
43
|
+
<h2 style="height: 18px;" class="card-pf-title"><%= _('Results') %></h2>
|
44
|
+
</div>
|
45
|
+
<div class="card-pf-body">
|
46
|
+
<%= react_component('RoundProgress', round: @round.id) %>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
<hr/>
|
52
|
+
<div id="hosts">
|
53
|
+
<%= react_component('Invocations', round: @round.id) %>
|
54
|
+
</div>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<div id='<%= f.object.to_param %>' class='tab-pane fields'>
|
2
|
+
<fieldset>
|
3
|
+
<h2><%= _("Ticket Field Details")%></h2>
|
4
|
+
<%= text_f f, :key, :disabled => f.object.persisted?, :size => "col-md-8" %>
|
5
|
+
<%= textarea_f f, :description, :rows => :auto, :size => "col-md-8", :class => "no-stretch" %>
|
6
|
+
|
7
|
+
</fieldset>
|
8
|
+
<fieldset>
|
9
|
+
<h2><%= _("Default Behavior") %></h2>
|
10
|
+
<% version = Foreman::Version.new %>
|
11
|
+
<% if version.major.to_i > 1 || version.minor.to_i >= 22 %>
|
12
|
+
<%= param_type_selector(f, false, :onchange => 'keyTypeChange(this)') %>
|
13
|
+
<% else %>
|
14
|
+
<%= param_type_selector(f, :onchange => 'keyTypeChange(this)') %>
|
15
|
+
<% end %>
|
16
|
+
<%= textarea_f f, :default_value, :value => f.object.default_value_before_type_cast, :size => "col-md-8",
|
17
|
+
:disabled => (f.object.omit),
|
18
|
+
:input_group_btn => fullscreen_input,
|
19
|
+
:rows => 1,
|
20
|
+
:label_help => _("Value to use when there is no match."),
|
21
|
+
:class => "no-stretch #{'masked-input' if f.object.hidden_value?}" %>
|
22
|
+
<div class="form-group">
|
23
|
+
<%= checkbox_f(f, :hidden_value, :label => _('Hidden Value'),
|
24
|
+
:class => 'hidden_value_textarea_switch', :onchange => 'toggle_lookupkey_hidden(this)',
|
25
|
+
:checked => f.object.hidden_value?,
|
26
|
+
:label_help => _("Hide all values for this parameter."),
|
27
|
+
:size => "col-md-1", :label_size => "col-md-2", :table_field => true) %>
|
28
|
+
</div>
|
29
|
+
</fieldset>
|
30
|
+
<fieldset>
|
31
|
+
<%= collapsing_header _("Optional Input Validator"), "#optional_input_validators_#{f.object.id}", "collapsed" %>
|
32
|
+
<div id="optional_input_validators_<%= f.object.id %>" class="collapse out">
|
33
|
+
<h6><%= _('Before including these fields in your tickets, Foreman will validate that your fields comply with the validation.') %></h6>
|
34
|
+
|
35
|
+
<%= checkbox_f(f, :required, :size => "col-md-8",
|
36
|
+
:label_help => _("If checked, will raise an error if there is no default value and no matcher provide a value.")
|
37
|
+
) %>
|
38
|
+
<%= validator_type_selector f %>
|
39
|
+
<%= text_f f, :validator_rule, :size => "col-md-8", :disabled => f.object.validator_type.blank?, :class => "no-stretch" %>
|
40
|
+
</div>
|
41
|
+
</fieldset>
|
42
|
+
</br>
|
43
|
+
<div class="matcher-parent" <%= "id=#{f.object.key.to_s.gsub(' ', '_')}_lookup_key_override_value" %>>
|
44
|
+
<fieldset>
|
45
|
+
<h2><%= _("Prioritize Attribute Order") %></h2>
|
46
|
+
<h6><%= _("Set the order in which values are resolved.") %></h6>
|
47
|
+
<%= textarea_f f, :path, :rows => :auto, :label => _("Order"), :id => 'order', :size => "col-md-8", :onchange => 'fill_in_matchers()', :value => f.object.path, :class => "no-stretch",
|
48
|
+
:label_help => _("The order in which matchers keys are processed, first match wins.<br> You may use multiple attributes as a matcher key, for example, an order of <code>action,window</code> would expect a matcher such as <code>action = \"create\", window = \"Development Window\"</code>").html_safe %>
|
49
|
+
<%= checkbox_f(f, :merge_overrides, :onchange => 'mergeOverridesChanged(this)', :table_field => true,
|
50
|
+
:disabled => !f.object.supports_merge?, :size => "col-md-1", :label_size => "col-md-2",
|
51
|
+
:label_help => _("Continue to look for matches after first find (only array/hash type)? Note: merging overrides ignores all matchers that are omitted.")) %>
|
52
|
+
<%= checkbox_f(f, :merge_default, :disabled => !f.object.merge_overrides, :size => "col-md-1", :table_field => true,
|
53
|
+
:label_size => "col-md-2", :label_help => _("Include default value when merging all matching values.")) %>
|
54
|
+
<%= checkbox_f(f, :avoid_duplicates, :disabled => (!f.object.supports_uniq? || !f.object.merge_overrides),
|
55
|
+
:size => "col-md-1", :label_size => "col-md-2", :table_field => true,
|
56
|
+
:label_help => _("Avoid duplicate values when merging them (only array type)?")) %>
|
57
|
+
</fieldset>
|
58
|
+
</br>
|
59
|
+
<fieldset>
|
60
|
+
<h2><%= _("Specify Matchers") %> <%= documentation_button('4.2.6SmartMatchers') %></h2>
|
61
|
+
<div class="children_fields lookup_values">
|
62
|
+
<%= render 'lookup_keys/values', :f => f, :is_param => true %>
|
63
|
+
</div>
|
64
|
+
</fieldset>
|
65
|
+
</div>
|
66
|
+
</div>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<%= breadcrumbs(items: [ { caption: _('Ticket Fields'), url: url_for(ticket_fields_path) }, { caption: _('Edit %s' % @ticket_field.key) }], switchable: false) %>
|
2
|
+
<% title _('Edit Ticket Field') %>
|
3
|
+
<%= form_for(@ticket_field) do |f| %>
|
4
|
+
<%= render 'fields', f: f %>
|
5
|
+
<%= submit_or_cancel f %>
|
6
|
+
<% end %>
|