refactored analytics mgt component

apim420
Amalka Subasinghe 2 years ago
parent 7215c2f827
commit 8e26f3b4dd

@ -27,7 +27,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.api</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api</artifactId>
<packaging>war</packaging>
<name>Entgra - Grafana Proxy API</name>
<description>Entgra - Grafana Proxy API</description>
@ -320,7 +320,7 @@
</dependency>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.core</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@ -330,7 +330,7 @@
</dependency>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.common</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.api.service;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api;
import com.google.gson.JsonObject;
import io.swagger.annotations.Api;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.api.service.addons;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.addons;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

@ -16,7 +16,7 @@
* under the License.
*
*/
package io.entgra.analytics.mgt.grafana.proxy.api.service.bean;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.bean;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;

@ -16,7 +16,7 @@
* under the License.
*
*/
package io.entgra.analytics.mgt.grafana.proxy.api.service.bean;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.bean;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;

@ -1,15 +1,14 @@
package io.entgra.analytics.mgt.grafana.proxy.api.service.impl;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.impl;
import com.google.gson.JsonObject;
import io.entgra.analytics.mgt.grafana.proxy.api.service.GrafanaAPIProxyService;
import io.entgra.analytics.mgt.grafana.proxy.api.service.bean.ErrorResponse;
import io.entgra.analytics.mgt.grafana.proxy.api.service.exception.RefererNotValid;
import io.entgra.analytics.mgt.grafana.proxy.api.service.impl.util.GrafanaRequestHandlerUtil;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.analytics.mgt.grafana.proxy.core.bean.GrafanaPanelIdentifier;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.MaliciousQueryAttempt;
import io.entgra.analytics.mgt.grafana.proxy.core.internal.GrafanaMgtDataHolder;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.GrafanaAPIProxyService;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.bean.ErrorResponse;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.exception.RefererNotValid;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.impl.util.GrafanaRequestHandlerUtil;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.bean.GrafanaPanelIdentifier;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.MaliciousQueryAttempt;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.internal.GrafanaMgtDataHolder;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.exceptions.DBConnectionException;

@ -16,16 +16,16 @@
* under the License.
*
*/
package io.entgra.analytics.mgt.grafana.proxy.api.service.impl.util;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.impl.util;
import com.google.gson.JsonObject;
import io.entgra.analytics.mgt.grafana.proxy.api.service.bean.ErrorResponse;
import io.entgra.analytics.mgt.grafana.proxy.api.service.exception.RefererNotValid;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.analytics.mgt.grafana.proxy.core.bean.GrafanaPanelIdentifier;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.GrafanaEnvVariablesNotDefined;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.bean.ErrorResponse;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.exception.RefererNotValid;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.bean.GrafanaPanelIdentifier;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.GrafanaEnvVariablesNotDefined;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpResponse;

@ -35,7 +35,7 @@
</jaxrs:server>
<bean id="swaggerConfig" class="io.swagger.jaxrs.config.BeanConfig">
<property name="resourcePackage" value="io.entgra.analytics.mgt.grafana.proxy.api.service"/>
<property name="resourcePackage" value="io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.service"/>
<property name="version" value="1.0"/>
<property name="host" value="localhost:9443"/>
<property name="schemes" value="https" />
@ -47,15 +47,15 @@
<property name="scan" value="true"/>
</bean>
<bean id="grafanaAPIProxyService" class="io.entgra.analytics.mgt.grafana.proxy.api.service.impl.GrafanaAPIProxyServiceImpl"/>
<bean id="grafanaAPIProxyService" class="io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.impl.GrafanaAPIProxyServiceImpl"/>
<bean id="swaggerWriter" class="io.swagger.jaxrs.listing.SwaggerSerializers" />
<bean id="swaggerResource" class="io.swagger.jaxrs.listing.ApiListingResource" />
<bean id="jsonProvider" class="io.entgra.analytics.mgt.grafana.proxy.api.service.addons.GsonMessageBodyHandler"/>
<bean id="io.entgra.analytics.mgt.grafana.proxy.api.service.addons.ValidationInterceptor" class="io.entgra.analytics.mgt.grafana.proxy.api.service.addons.ValidationInterceptor"/>
<bean id="jsonProvider" class="io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.addons.GsonMessageBodyHandler"/>
<bean id="io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.addons.ValidationInterceptor" class="io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.addons.ValidationInterceptor"/>
<cxf:bus>
<cxf:inInterceptors>
<ref bean="io.entgra.analytics.mgt.grafana.proxy.api.service.addons.ValidationInterceptor"/>
<ref bean="io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.addons.ValidationInterceptor"/>
</cxf:inInterceptors>
</cxf:bus>

@ -66,7 +66,7 @@
<filter>
<filter-name>ApiOriginFilter</filter-name>
<filter-class>io.entgra.analytics.mgt.grafana.proxy.api.service.addons.ApiOriginFilter</filter-class>
<filter-class>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api.addons.ApiOriginFilter</filter-class>
</filter>
<filter-mapping>

@ -27,7 +27,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.common</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common</artifactId>
<packaging>bundle</packaging>
<name>Entgra - Grafana API Handler Common</name>
<description>Entgra - Grafana API Handler Common</description>
@ -46,7 +46,7 @@
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
<Bundle-Description>Grafana Management Common Bundle</Bundle-Description>
<Export-Package>
io.entgra.analytics.mgt.grafana.proxy.common.*
io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.*
</Export-Package>
<Import-Package>
javax.xml.bind.annotation; version="${javax.xml.bind.imp.pkg.version}",

@ -27,7 +27,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.core</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core</artifactId>
<packaging>bundle</packaging>
<name>Entgra - Grafana API Handler Core</name>
<description>Entgra - Grafana API Handler Core</description>
@ -75,9 +75,9 @@
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
<Bundle-Description>Grafana API Management Core Bundle</Bundle-Description>
<Private-Package>io.entgra.analytics.mgt.grafana.proxy.core.internal</Private-Package>
<Private-Package>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.internal</Private-Package>
<Import-Package>
io.entgra.analytics.mgt.grafana.proxy.common.*,
io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.*,
javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
javax.xml.bind.annotation,
javax.xml.bind,
@ -88,8 +88,8 @@
io.entgra.application.mgt.core.*
</Import-Package>
<Export-Package>
!org.wso2.carbon.email.sender.core.internal,
io.entgra.analytics.mgt.grafana.proxy.core.*
!io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.internal,
io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.*
</Export-Package>
<Embed-Dependency>
scribe;scope=compile|runtime;inline=false,
@ -134,7 +134,7 @@
</dependency>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.common</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common</artifactId>
</dependency>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.bean;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.bean;
public class GrafanaPanelIdentifier {

@ -16,10 +16,10 @@
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.config;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config;
import io.entgra.analytics.mgt.grafana.proxy.core.config.xml.bean.CacheConfiguration;
import io.entgra.analytics.mgt.grafana.proxy.core.config.xml.bean.User;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config.xml.bean.CacheConfiguration;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config.xml.bean.User;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;

@ -15,10 +15,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.config;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;

@ -16,7 +16,7 @@
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.config.xml.bean;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config.xml.bean;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.config.xml.bean;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config.xml.bean;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.exception;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception;
public class DashboardNotFound extends GrafanaAPIException {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.exception;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception;
public class DatasourceNotFound extends GrafanaAPIException {

@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.exception;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
public class GrafanaAPIException extends GrafanaManagementException {

@ -15,10 +15,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.exception;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
public class GrafanaEnvVariablesNotDefined extends GrafanaManagementException {

@ -15,10 +15,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.exception;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
public class MaliciousQueryAttempt extends GrafanaManagementException {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.exception;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception;
public class PanelNotFound extends GrafanaAPIException {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.exception;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception;
public class QueryMisMatch extends MaliciousQueryAttempt {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.exception;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception;
public class QueryNotFound extends GrafanaAPIException {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.exception;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception;
public class TemplateNotFound extends GrafanaAPIException {

@ -16,12 +16,12 @@
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.internal;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.internal;
import io.entgra.analytics.mgt.grafana.proxy.core.service.GrafanaAPIService;
import io.entgra.analytics.mgt.grafana.proxy.core.service.GrafanaQueryService;
import io.entgra.analytics.mgt.grafana.proxy.core.service.impl.GrafanaAPIServiceImpl;
import io.entgra.analytics.mgt.grafana.proxy.core.service.impl.GrafanaQueryServiceImpl;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.GrafanaAPIService;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.GrafanaQueryService;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.impl.GrafanaAPIServiceImpl;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.impl.GrafanaQueryServiceImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext;

@ -16,10 +16,10 @@
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.internal;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.internal;
import io.entgra.analytics.mgt.grafana.proxy.core.service.GrafanaAPIService;
import io.entgra.analytics.mgt.grafana.proxy.core.service.GrafanaQueryService;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.GrafanaAPIService;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.GrafanaQueryService;
public class GrafanaMgtDataHolder {

@ -15,11 +15,11 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.service;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service;
import com.google.gson.JsonObject;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.analytics.mgt.grafana.proxy.core.service.bean.Datasource;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.bean.Datasource;
import java.io.IOException;

@ -15,10 +15,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.service;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service;
import com.google.gson.JsonObject;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import org.wso2.carbon.device.mgt.common.exceptions.DBConnectionException;
import java.io.IOException;

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.service.bean;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.bean;
public class Datasource {
private int id;

@ -16,16 +16,16 @@
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.service.cache;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.cache;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.analytics.mgt.grafana.proxy.core.config.GrafanaConfiguration;
import io.entgra.analytics.mgt.grafana.proxy.core.config.GrafanaConfigurationManager;
import io.entgra.analytics.mgt.grafana.proxy.core.config.xml.bean.CacheConfiguration;
import io.entgra.analytics.mgt.grafana.proxy.core.service.bean.Datasource;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config.GrafanaConfiguration;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config.GrafanaConfigurationManager;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config.xml.bean.CacheConfiguration;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.bean.Datasource;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;

@ -15,24 +15,24 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.service.impl;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.impl;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.DashboardNotFound;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.DatasourceNotFound;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.GrafanaEnvVariablesNotDefined;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.PanelNotFound;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.QueryNotFound;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.TemplateNotFound;
import io.entgra.analytics.mgt.grafana.proxy.core.service.GrafanaAPIService;
import io.entgra.analytics.mgt.grafana.proxy.core.service.bean.Datasource;
import io.entgra.analytics.mgt.grafana.proxy.core.service.cache.CacheManager;
import io.entgra.analytics.mgt.grafana.proxy.core.service.cache.QueryTemplateCacheKey;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.DashboardNotFound;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.DatasourceNotFound;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.GrafanaEnvVariablesNotDefined;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.PanelNotFound;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.QueryNotFound;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.TemplateNotFound;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.GrafanaAPIService;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.bean.Datasource;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.cache.CacheManager;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.cache.QueryTemplateCacheKey;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpResponse;

@ -15,24 +15,24 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.service.impl;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.impl;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.MaliciousQueryAttempt;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.QueryMisMatch;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.QueryNotFound;
import io.entgra.analytics.mgt.grafana.proxy.core.service.GrafanaAPIService;
import io.entgra.analytics.mgt.grafana.proxy.core.service.GrafanaQueryService;
import io.entgra.analytics.mgt.grafana.proxy.core.service.bean.Datasource;
import io.entgra.analytics.mgt.grafana.proxy.core.service.cache.CacheManager;
import io.entgra.analytics.mgt.grafana.proxy.core.service.cache.QueryTemplateCacheKey;
import io.entgra.analytics.mgt.grafana.proxy.core.sql.query.GrafanaPreparedQueryBuilder;
import io.entgra.analytics.mgt.grafana.proxy.core.sql.query.PreparedQuery;
import io.entgra.analytics.mgt.grafana.proxy.core.sql.query.encoder.QueryEncoderFactory;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.MaliciousQueryAttempt;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.QueryMisMatch;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.QueryNotFound;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.GrafanaAPIService;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.GrafanaQueryService;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.bean.Datasource;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.cache.CacheManager;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.service.cache.QueryTemplateCacheKey;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query.GrafanaPreparedQueryBuilder;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query.PreparedQuery;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query.encoder.QueryEncoderFactory;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.exceptions.DBConnectionException;

@ -1,4 +1,4 @@
package io.entgra.analytics.mgt.grafana.proxy.core.sql.connection;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.connection;
import io.entgra.application.mgt.core.config.Configuration;
import io.entgra.application.mgt.core.config.ConfigurationManager;

@ -15,11 +15,11 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.sql.query;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.QueryMisMatch;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.QueryMisMatch;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.sql.query;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query;
import java.util.List;

@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.sql.query.encoder;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query.encoder;
import io.entgra.analytics.mgt.grafana.proxy.core.sql.query.PreparedQuery;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query.PreparedQuery;
import org.apache.commons.lang.StringEscapeUtils;
import java.sql.SQLException;

@ -15,10 +15,10 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.sql.query.encoder;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query.encoder;
import io.entgra.analytics.mgt.grafana.proxy.core.sql.connection.GrafanaDatasourceConnectionFactory;
import io.entgra.analytics.mgt.grafana.proxy.core.sql.query.PreparedQuery;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.connection.GrafanaDatasourceConnectionFactory;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query.PreparedQuery;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.exceptions.DBConnectionException;

@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.sql.query.encoder;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query.encoder;
import io.entgra.analytics.mgt.grafana.proxy.core.sql.query.PreparedQuery;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query.PreparedQuery;
import org.wso2.carbon.device.mgt.common.exceptions.DBConnectionException;
import java.sql.SQLException;

@ -15,9 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.sql.query.encoder;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.query.encoder;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
public class QueryEncoderFactory {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.util;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util;
public class GrafanaConstants {

@ -15,19 +15,15 @@
* under the License.
*/
package io.entgra.analytics.mgt.grafana.proxy.core.util;
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.analytics.mgt.grafana.proxy.core.bean.GrafanaPanelIdentifier;
import io.entgra.analytics.mgt.grafana.proxy.core.config.GrafanaConfiguration;
import io.entgra.analytics.mgt.grafana.proxy.core.config.GrafanaConfigurationManager;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.GrafanaEnvVariablesNotDefined;
import io.entgra.analytics.mgt.grafana.proxy.core.service.GrafanaAPIService;
import io.entgra.analytics.mgt.grafana.proxy.core.service.GrafanaQueryService;
import io.entgra.analytics.mgt.grafana.proxy.core.service.impl.GrafanaAPIServiceImpl;
import io.entgra.analytics.mgt.grafana.proxy.core.service.impl.GrafanaQueryServiceImpl;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.bean.GrafanaPanelIdentifier;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config.GrafanaConfiguration;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.config.GrafanaConfigurationManager;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.GrafanaEnvVariablesNotDefined;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;

@ -34,9 +34,9 @@
<modules>
<module>io.entgra.analytics.mgt.grafana.proxy.core</module>
<module>io.entgra.analytics.mgt.grafana.proxy.common</module>
<module>io.entgra.analytics.mgt.grafana.proxy.api</module>
<module>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core</module>
<module>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common</module>
<module>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api</module>
</modules>
</project>

@ -104,7 +104,7 @@
</dependency>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.core</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>

@ -18,9 +18,9 @@
package io.entgra.ui.request.interceptor;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.GrafanaEnvVariablesNotDefined;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.GrafanaEnvVariablesNotDefined;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import io.entgra.ui.request.interceptor.beans.AuthData;
import io.entgra.ui.request.interceptor.beans.ProxyResponse;
import io.entgra.ui.request.interceptor.util.GrafanaHandlerUtil;

@ -18,8 +18,8 @@
package io.entgra.ui.request.interceptor.websocket;
import io.entgra.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common.exception.GrafanaManagementException;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

@ -18,9 +18,9 @@
package io.entgra.ui.request.interceptor.websocket;
import io.entgra.analytics.mgt.grafana.proxy.core.exception.GrafanaEnvVariablesNotDefined;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.exception.GrafanaEnvVariablesNotDefined;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaConstants;
import io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.util.GrafanaUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

@ -49,7 +49,7 @@
<artifactItems>
<artifactItem>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.api</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api</artifactId>
<version>${project.version}</version>
<type>war</type>
<overWrite>true</overWrite>

@ -38,11 +38,11 @@
<dependencies>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.common</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common</artifactId>
</dependency>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.core</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core</artifactId>
</dependency>
<dependency>
<groupId>com.googlecode.plist</groupId>
@ -114,10 +114,10 @@
</adviceFile>
<bundles>
<bundleDef>
io.entgra.device.mgt.core:io.entgra.analytics.mgt.grafana.proxy.common:${carbon.device.mgt.version}
io.entgra.device.mgt.core:io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common:${carbon.device.mgt.version}
</bundleDef>
<bundleDef>
io.entgra.device.mgt.core:io.entgra.analytics.mgt.grafana.proxy.core:${carbon.device.mgt.version}
io.entgra.device.mgt.core:io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core:${carbon.device.mgt.version}
</bundleDef>
<bundleDef>
com.googlecode.plist:dd-plist:${googlecode.plist.version}

@ -44,7 +44,7 @@
<!-- <module>components/certificate-mgt</module>-->
<!-- <module>components/ui-request-interceptor</module>-->
<!-- <module>components/transport-mgt</module>-->
<!-- <module>components/analytics-mgt</module>-->
<module>components/analytics-mgt</module>
<module>components/webapp-authenticator-framework</module>
<!-- <module>components/logger</module>-->
<module>components/task-mgt</module>
@ -61,7 +61,7 @@
<!-- <module>features/jwt-client</module>-->
<!-- <module>features/device-mgt-extensions</module>-->
<!-- <module>features/transport-mgt</module>-->
<!-- <module>features/analytics-mgt</module>-->
<module>features/analytics-mgt</module>
<module>features/webapp-authenticator-framework</module>
<!-- <module>features/logger</module>-->
<module>features/task-mgt</module>
@ -322,17 +322,17 @@
</dependency>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.api</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api</artifactId>
<version>${carbon.device.mgt.version}</version>
</dependency>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.core</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core</artifactId>
<version>${carbon.device.mgt.version}</version>
</dependency>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.analytics.mgt.grafana.proxy.common</artifactId>
<artifactId>io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.common</artifactId>
<version>${carbon.device.mgt.version}</version>
</dependency>
<dependency>

Loading…
Cancel
Save