#5294 Add new monitoring options for release monitoring
Merged 2 years ago by ngompa. Opened 2 years ago by zlopez.
zlopez/pagure monitoring_settings  into  master

@@ -107,6 +107,46 @@ 

            </div>

          </div>

        </a>

+       <a class="dropdown-item pl-2" id="monitoring_all_option_button">

+         <div class="media">

+           <div class="align-self-center check-icon pr-2">

+             <span class="fa fa-fw"></span>

+           </div>

+           <div class="media-body">

+             Monitoring all

+           </div>

+         </div>

+       </a>

+       <a class="dropdown-item pl-2" id="monitoring_all_and_scratch_option_button">

+         <div class="media">

+           <div class="align-self-center check-icon pr-2">

+             <span class="fa fa-fw"></span>

+           </div>

+           <div class="media-body">

+             Monitoring all and scratch builds

+           </div>

+         </div>

+       </a>

+       <a class="dropdown-item pl-2" id="monitoring_stable_option_button">

+         <div class="media">

+           <div class="align-self-center check-icon pr-2">

+             <span class="fa fa-fw"></span>

+           </div>

+           <div class="media-body">

+             Monitoring stable only

+           </div>

+         </div>

+       </a>

+       <a class="dropdown-item pl-2" id="monitoring_stable_and_scratch_option_button">

+         <div class="media">

+           <div class="align-self-center check-icon pr-2">

+             <span class="fa fa-fw"></span>

+           </div>

+           <div class="media-body">

+             Monitoring stable only and scratch builds

+           </div>

+         </div>

+       </a>

      </div>

      <div id="monitoring_feedback"></div>

      {% else %}
@@ -273,6 +313,18 @@ 

          } else if (status === "monitoring-with-scratch") {

            _label = "Scratch builds"

            $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")

+         } else if (status === "monitoring-all") {

+           _label = "Monitoring all"

+           $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")

+         } else if (status === "monitoring-all-scratch") {

+           _label = "All - Scratch builds"

+           $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")

+         } else if (status === "monitoring-stable") {

+           _label = "Monitoring stable"

+           $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")

+         } else if (status === "monitoring-stable-scratch") {

+           _label = "Stable - Scratch builds"

+           $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")

          } else {

            $("#monitoring-icon").attr("class", "fa fa-fw fa-eye-slash")

          }
@@ -301,6 +353,16 @@ 

          } else if (selectedValue === "monitoring_and_scratch_option_button") {

              _status = "monitoring-with-scratch"

          }

+         if (selectedValue === "monitoring_all_option_button") {

+             _status = "monitoring-all";

+         } else if (selectedValue === "monitoring_all_and_scratch_option_button") {

+             _status = "monitoring-all-scratch"

+         }

+         if (selectedValue === "monitoring_stable_option_button") {

+             _status = "monitoring-stable";

+         } else if (selectedValue === "monitoring_stable_and_scratch_option_button") {

+             _status = "monitoring-stable-scratch"

+         }

  

          $.ajax({

            url: "{{ url_for('distgit_ns.anitya_patch_endpoint', repo=repo.name, namespace=repo.namespace) }}",

These new options are already supported and documented in the-new-hotness and
will be available in next release.

Link to documentation:
https://the-new-hotness.readthedocs.io/en/latest/user-guide.html#notifications-settings

Signed-off-by: Michal Konečný mkonecny@redhat.com

rebased onto a7c4add

2 years ago

Pull-Request has been merged by ngompa

2 years ago
Metadata