mcgilman commented on code in PR #8190:
URL: https://github.com/apache/nifi/pull/8190#discussion_r1437691415
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-listing.component.html:
##########
@@ -41,6 +41,9 @@
<div>Last updated:</div>
<div class="refresh-timestamp">{{ loadedTimestamp$ | async
}}</div>
</div>
+ <div>
+ <a (click)="openSystemDiagnostics($event)">System
Diagnostics</a>
Review Comment:
There is an explicit permission for accessing system diagnostics. In current
NiFi the URL is always shown and the user gets an insufficent permissions error
message when clicking it. We could consider hiding the link in this case or
showing the message in a dialog. Currently, it is unhandled and nothing happens
in the UI. Inspecting Dev Tools shows the `403` response.
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-listing.component.ts:
##########
@@ -104,4 +108,15 @@ export class ConnectionStatusListing {
})
);
}
+
+ openSystemDiagnostics(event: MouseEvent) {
+ event.stopPropagation();
Review Comment:
I don't think this `stopPropagation` is needed here. It's needed in table
actions which results in the user being navigated someplace. That navigation
conflicted with the row selection which also changed the route. This comment
applies to all instances of `openSystemDiagnostics` in all component status
listings.
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/system-diagnostics-dialog/system-diagnostics-dialog.component.spec.ts:
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SystemDiagnosticsDialog } from
'./system-diagnostics-dialog.component';
+import { provideMockStore } from '@ngrx/store/testing';
+import { initialSystemDiagnosticsState } from
'../../../state/system-diagnostics/system-diagnostics.reducer';
+import { MAT_DIALOG_DATA } from '@angular/material/dialog';
+
+describe('SystemDiagnosticsDialogComponent', () => {
Review Comment:
This text does not match the component name. :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]