
web.eventstream.index.jsp Maven / Gradle / Ivy
<%--
~ Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. 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.
--%>
<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="org.wso2.carbon.analytics.stream.persistence.stub.EventStreamPersistenceAdminServiceStub" %>
<%@ page import="org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStub" %>
<%@ page import="org.wso2.carbon.event.stream.stub.types.EventStreamInfoDto" %>
<%@ page import="org.wso2.carbon.event.stream.ui.EventStreamUIUtils" %>
<%@ page import="org.owasp.encoder.Encode" %>
<%
EventStreamAdminServiceStub stub = EventStreamUIUtils.getEventStreamAdminService(config, session, request);
String eventStreamName = request.getParameter("eventStream");
String eventStreamVersion = request.getParameter("eventStreamVersion");
int totalEventStreams = 0;
if (eventStreamName != null && eventStreamVersion != null) {
stub.removeEventStreamDefinition(eventStreamName, eventStreamVersion);
%>
<%
}
EventStreamInfoDto[] eventStreamDetailsArray = stub.getAllEventStreamDefinitionDto();
if (eventStreamDetailsArray != null) {
totalEventStreams = eventStreamDetailsArray.length;
}
EventStreamPersistenceAdminServiceStub persistenceAdminServiceStub =
EventStreamUIUtils.getEventStreamPersistenceAdminService(config, session, request);
pageContext.setAttribute("isAnalyticsPersistenceBackendAvailable",
EventStreamUIUtils.isEventStreamPersistenceAdminServiceAvailable(persistenceAdminServiceStub),
PageContext.APPLICATION_SCOPE);
%>
Add Event Stream
<%=totalEventStreams%>
<%
if (eventStreamDetailsArray != null) {
%>
<%
for (EventStreamInfoDto eventStreamInfoDto : eventStreamDetailsArray) {
String eventStreamWithVersion = eventStreamInfoDto.getStreamName() + ":" + eventStreamInfoDto.getStreamVersion();
%>
<%=eventStreamWithVersion%>
<%= eventStreamInfoDto.getStreamDescription() != null ? Encode.forHtmlContent(eventStreamInfoDto.getStreamDescription()) : "" %>
Simulate
<%
if (eventStreamInfoDto.getEditable()) {
%>
Delete
Edit
<%
}
%>
<%
}
} else {
%>
<%
}
%>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy