mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Fix warning
This commit is contained in:
		@@ -5548,7 +5548,7 @@
 | 
			
		||||
        </context-group>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/common/system-status-dialog/system-status-dialog.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">172</context>
 | 
			
		||||
          <context context-type="linenumber">176</context>
 | 
			
		||||
        </context-group>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/manage/mail/mail.component.html</context>
 | 
			
		||||
@@ -6027,7 +6027,7 @@
 | 
			
		||||
        <source>Last Run</source>
 | 
			
		||||
        <context-group purpose="location">
 | 
			
		||||
          <context context-type="sourcefile">src/app/components/common/system-status-dialog/system-status-dialog.component.html</context>
 | 
			
		||||
          <context context-type="linenumber">155</context>
 | 
			
		||||
          <context context-type="linenumber">159</context>
 | 
			
		||||
        </context-group>
 | 
			
		||||
      </trans-unit>
 | 
			
		||||
      <trans-unit id="6732151329960766506" datatype="html">
 | 
			
		||||
 
 | 
			
		||||
@@ -128,11 +128,11 @@
 | 
			
		||||
                    <i-bs name="check-circle-fill" class="text-primary ms-2 lh-1" [ngbPopover]="classifierStatus" triggers="mouseenter:mouseleave"></i-bs>
 | 
			
		||||
                  }
 | 
			
		||||
                } @else {
 | 
			
		||||
                    <i-bs name="exclamation-triangle-fill" class="ms-2 lh-1"
 | 
			
		||||
                    [class.text-danger]="status.tasks.classifier_status === SystemStatusItemStatus.ERROR"
 | 
			
		||||
                    [class.text-warning]="status.tasks.classifier_status === SystemStatusItemStatus.WARNING"
 | 
			
		||||
                    ngbPopover="{{status.tasks.classifier_error}}"
 | 
			
		||||
                    triggers="mouseenter:mouseleave"></i-bs>
 | 
			
		||||
                  <i-bs name="exclamation-triangle-fill" class="ms-2 lh-1"
 | 
			
		||||
                  [class.text-danger]="status.tasks.classifier_status === SystemStatusItemStatus.ERROR"
 | 
			
		||||
                  [class.text-warning]="status.tasks.classifier_status === SystemStatusItemStatus.WARNING"
 | 
			
		||||
                  ngbPopover="{{status.tasks.classifier_error}}"
 | 
			
		||||
                  triggers="mouseenter:mouseleave"></i-bs>
 | 
			
		||||
                }
 | 
			
		||||
              </dd>
 | 
			
		||||
              <ng-template #classifierStatus>
 | 
			
		||||
@@ -148,7 +148,11 @@
 | 
			
		||||
                    <i-bs name="check-circle-fill" class="text-primary ms-2 lh-1" [ngbPopover]="sanityCheckerStatus" triggers="mouseenter:mouseleave"></i-bs>
 | 
			
		||||
                  }
 | 
			
		||||
                } @else {
 | 
			
		||||
                  <i-bs name="exclamation-triangle-fill" class="text-danger ms-2 lh-1" ngbPopover="{{status.tasks.sanity_check_error}}" triggers="mouseenter:mouseleave"></i-bs>
 | 
			
		||||
                  <i-bs name="exclamation-triangle-fill" class="ms-2 lh-1"
 | 
			
		||||
                  [class.text-danger]="status.tasks.sanity_check_status === SystemStatusItemStatus.ERROR"
 | 
			
		||||
                  [class.text-warning]="status.tasks.sanity_check_status === SystemStatusItemStatus.WARNING"
 | 
			
		||||
                  ngbPopover="{{status.tasks.sanity_check_error}}"
 | 
			
		||||
                  triggers="mouseenter:mouseleave"></i-bs>
 | 
			
		||||
                }
 | 
			
		||||
              </dd>
 | 
			
		||||
              <ng-template #sanityCheckerStatus>
 | 
			
		||||
 
 | 
			
		||||
@@ -225,7 +225,6 @@ class TestSystemStatus(APITestCase):
 | 
			
		||||
            response.data["tasks"]["classifier_status"],
 | 
			
		||||
            "WARNING",
 | 
			
		||||
        )
 | 
			
		||||
        self.assertIsNone(response.data["tasks"]["classifier_error"])
 | 
			
		||||
 | 
			
		||||
    def test_system_status_classifier_error(self):
 | 
			
		||||
        """
 | 
			
		||||
@@ -287,7 +286,6 @@ class TestSystemStatus(APITestCase):
 | 
			
		||||
            response.data["tasks"]["sanity_check_status"],
 | 
			
		||||
            "WARNING",
 | 
			
		||||
        )
 | 
			
		||||
        self.assertIsNone(response.data["tasks"]["sanity_check_error"])
 | 
			
		||||
 | 
			
		||||
    def test_system_status_sanity_check_error(self):
 | 
			
		||||
        """
 | 
			
		||||
 
 | 
			
		||||
@@ -2670,6 +2670,7 @@ class SystemStatusView(PassUserMixin):
 | 
			
		||||
        classifier_error = None
 | 
			
		||||
        if last_trained_task is None:
 | 
			
		||||
            classifier_status = "WARNING"
 | 
			
		||||
            classifier_error = "No classifier training tasks found"
 | 
			
		||||
        elif last_trained_task and last_trained_task.status == states.FAILURE:
 | 
			
		||||
            classifier_status = "ERROR"
 | 
			
		||||
            classifier_error = last_trained_task.result
 | 
			
		||||
@@ -2688,6 +2689,7 @@ class SystemStatusView(PassUserMixin):
 | 
			
		||||
        sanity_check_error = None
 | 
			
		||||
        if last_sanity_check is None:
 | 
			
		||||
            sanity_check_status = "WARNING"
 | 
			
		||||
            sanity_check_error = "No sanity check tasks found"
 | 
			
		||||
        elif last_sanity_check and last_sanity_check.status == states.FAILURE:
 | 
			
		||||
            sanity_check_status = "ERROR"
 | 
			
		||||
            sanity_check_error = last_sanity_check.result
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user