ohnoitsyou commented on a change in pull request #5743:
URL: https://github.com/apache/nifi/pull/5743#discussion_r806146305
##########
File path:
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/package.json
##########
@@ -66,6 +66,7 @@
"reset-css": "4.0.1",
"roboto-fontface": "0.10.0",
"rxjs": "6.5.2",
+ "sass": "^1.49.0",
Review comment:
`node-sass` is deprecated. It's been replaced by `dart-sass` and the
pure javascript implementation is contained in `sass`
I'll nix the `^`
##########
File path:
nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/api/VersionResource.java
##########
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+package org.apache.nifi.registry.web.api;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.Authorization;
+import org.apache.nifi.registry.NiFiRegistryApiApplication;
+import org.apache.nifi.registry.RegistryVersion;
+import org.apache.nifi.registry.event.EventService;
+import org.apache.nifi.registry.web.service.ServiceFacade;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Component
+@Path("/version")
+@Api(
+ value = "version",
+ description = "Retrieves the version information for this NiFi
Registry.",
+ authorizations = { @Authorization("Authorization") }
+)
+public class VersionResource extends ApplicationResource {
+
+ @Autowired
+ public VersionResource(
+ final ServiceFacade serviceFacade,
+ final EventService eventService) {
+ super(serviceFacade, eventService);
+ }
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ @ApiOperation(
+ value = "Get version",
+ notes = "Gets the NiFi Registry version.",
+ response = RegistryVersion.class
+ )
+ public Response getVersion() {
+ final String implVersion =
NiFiRegistryApiApplication.class.getPackage().getImplementationVersion();
Review comment:
It ultimately returns the `project.version` from the
`nifi-registry-web-api` pom
##########
File path:
nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/api/VersionResource.java
##########
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+package org.apache.nifi.registry.web.api;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.Authorization;
+import org.apache.nifi.registry.NiFiRegistryApiApplication;
+import org.apache.nifi.registry.RegistryVersion;
+import org.apache.nifi.registry.event.EventService;
+import org.apache.nifi.registry.web.service.ServiceFacade;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Component
+@Path("/version")
+@Api(
+ value = "version",
+ description = "Retrieves the version information for this NiFi
Registry.",
+ authorizations = { @Authorization("Authorization") }
+)
+public class VersionResource extends ApplicationResource {
+
+ @Autowired
+ public VersionResource(
+ final ServiceFacade serviceFacade,
+ final EventService eventService) {
+ super(serviceFacade, eventService);
+ }
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ @ApiOperation(
+ value = "Get version",
+ notes = "Gets the NiFi Registry version.",
+ response = RegistryVersion.class
+ )
+ public Response getVersion() {
+ final String implVersion =
NiFiRegistryApiApplication.class.getPackage().getImplementationVersion();
Review comment:
I tried it that was initially, with the filtering, but Mark (up above)
recommended against that as it allowed it to be modified at runtime
##########
File path:
nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/api/VersionResource.java
##########
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+package org.apache.nifi.registry.web.api;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.Authorization;
+import org.apache.nifi.registry.NiFiRegistryApiApplication;
+import org.apache.nifi.registry.RegistryVersion;
+import org.apache.nifi.registry.event.EventService;
+import org.apache.nifi.registry.web.service.ServiceFacade;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Component
+@Path("/version")
+@Api(
+ value = "version",
+ description = "Retrieves the version information for this NiFi
Registry.",
+ authorizations = { @Authorization("Authorization") }
+)
+public class VersionResource extends ApplicationResource {
Review comment:
I'm open to this. Thinking about it, makes perfect sense.
--
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]