Examples of Radio


Examples of org.dspace.app.xmlui.wing.element.Radio

           
           
            Row row = summary.addRow();

              // Add radio-button to select this as the primary bitstream
                Radio primary = row.addCell().addRadio("primary_bitstream_id");
                primary.addOption(String.valueOf(id));
               
                // If this bitstream is already marked as the primary bitstream
                // mark it as such.
                if(bundles[0].getPrimaryBitstreamID() == id) {
                    primary.setOptionSelected(String.valueOf(id));
                }
           
            if (!workflow)
            {
              // Workflow users can not remove files.
View Full Code Here

Examples of org.graylog2.restclient.models.Radio

        final Map<Input, Map<ClusterEntity, InputState>> globalInputs = Maps.newHashMap();
        final List<InputState> localInputs = Lists.newArrayList();

        try {
            Radio radio = nodeService.loadRadio(radioId);

            if (radio == null) {
                String message = "Did not find radio.";
                return status(404, views.html.errors.error.render(message, new RuntimeException(), request()));
            }

            for (InputState inputState : inputService.loadAllInputStates(radio)) {
                if (!inputState.getInput().getGlobal())
                    localInputs.add(inputState);
                else {
                    Map<ClusterEntity, InputState> clusterEntityInputStateMap = Maps.newHashMap();
                    clusterEntityInputStateMap.put(radio, inputState);
                    globalInputs.put(inputState.getInput(), clusterEntityInputStateMap);
                }
            }

            BreadcrumbList bc = new BreadcrumbList();
            bc.addCrumb("System", routes.SystemController.index(0));
            bc.addCrumb("Nodes", routes.NodesController.nodes());
            bc.addCrumb(radio.getShortNodeId(), routes.RadiosController.show(radio.getId()));
            bc.addCrumb("Inputs", routes.InputsController.manageRadio(radio.getId()));

            return ok(views.html.system.inputs.manage_radio.render(
                    currentUser(),
                    bc,
                    radio,
                    globalInputs,
                    localInputs,
                    radio.getAllInputTypeInformation(),
                    nodeService.loadMasterNode()
            ));
        } catch (IOException e) {
            return status(500, views.html.errors.error.render(ApiClient.ERROR_MSG_IO, e, request()));
        } catch (APIException e) {
View Full Code Here

Examples of org.graylog2.restclient.models.Radio

        }
        final Form<LaunchInputRequest> form = launchInputRequestForm.bindFromRequest();
        final LaunchInputRequest request = form.get();

        try {
            final Radio radio = nodeService.loadRadio(radioId);
            final InputTypeSummaryResponse inputInfo = radio.getInputTypeInformation(request.type);

            final Map<String, Object> configuration;
            try {
                configuration = extractConfiguration(request.configuration, inputInfo);
            } catch (IllegalArgumentException e) {
                return status(400, views.html.errors.error.render("Invalid input configuration", new RuntimeException("Invalid configuration for input " + request.title), request()));
            }

            try {
                if (radio.launchInput(request.title, request.type, false, configuration, currentUser(), inputInfo.isExclusive) == null) {
                    return status(500, views.html.errors.error.render(ApiClient.ERROR_MSG_IO, new RuntimeException("Could not launch input " + request.title), request()));
                }
            } catch (ExclusiveInputException e) {
                flash("error", "This input is exclusive and already running.");
                return redirect(routes.InputsController.index());
View Full Code Here

Examples of org.graylog2.restclient.models.Radio

    public Result show(String index, String id) {
        try {
            MessageResult message = messagesService.getMessage(index, id);
            Node sourceNode = getSourceNode(message);
            Radio sourceRadio = getSourceRadio(message);

            List<Stream> messageInStreams = Lists.newArrayList();

            for (String streamId : message.getStreamIds()) {
                if (isPermitted(STREAMS_READ, streamId)) {
View Full Code Here

Examples of org.graylog2.restclient.models.Radio

    public Result partial(String index, String id) {
        try {
            MessageResult message = messagesService.getMessage(index, id);
            Node sourceNode = getSourceNode(message);
            Radio sourceRadio = getSourceRadio(message);
            List<Stream> messageInStreams = Lists.newArrayList();

            for (String streamId : message.getStreamIds()) {
                if (isPermitted(STREAMS_READ, streamId)) {
                    try {
View Full Code Here

Examples of org.graylog2.restclient.models.Radio

        }
    }

    public Result ofRadio(String radioId, String preFilter) {
        try {
            Radio radio = nodeService.loadRadio(radioId);

            BreadcrumbList bc = new BreadcrumbList();
            bc.addCrumb("System", routes.SystemController.index(0));
            bc.addCrumb("Nodes", routes.NodesController.nodes());
            bc.addCrumb(radio.getShortNodeId(), routes.RadiosController.show(radio.getId()));
            bc.addCrumb("Metrics", routes.MetricsController.ofRadio(radio.getId(), ""));

            return ok(views.html.system.metrics.of_node.render(currentUser(), bc, radio, radio.getMetrics("org.graylog2"), preFilter));
        } catch (IOException e) {
            return status(500, views.html.errors.error.render(ApiClient.ERROR_MSG_IO, e, request()));
        } catch (APIException e) {
            String message = "Could not fetch system information. We expected HTTP 200, but got a HTTP " + e.getHttpCode() + ".";
            return status(500, views.html.errors.error.render(message, e, request()));
View Full Code Here

Examples of org.graylog2.restclient.models.Radio

    @Inject
    private NodeService nodeService;

    public Result show(String radioId) {
        try {
            Radio radio = nodeService.loadRadio(radioId);

            BreadcrumbList bc = new BreadcrumbList();
            bc.addCrumb("System", routes.SystemController.index(0));
            bc.addCrumb("Nodes", routes.NodesController.nodes());
            bc.addCrumb(radio.getShortNodeId(), routes.RadiosController.show(radio.getId()));

            return ok(views.html.system.radios.show.render(currentUser(), bc, radio));
        } catch (NodeService.NodeNotFoundException e) {
            return status(404, views.html.errors.error.render(ApiClient.ERROR_MSG_NODE_NOT_FOUND, e, request()));
        }
View Full Code Here

Examples of org.graylog2.restclient.models.Radio

        }
    }

    public Result threadDump(String radioId) {
        try {
            Radio radio = nodeService.loadRadio(radioId);

            BreadcrumbList bc = new BreadcrumbList();
            bc.addCrumb("System", routes.SystemController.index(0));
            bc.addCrumb("Nodes", routes.NodesController.nodes());
            bc.addCrumb(radio.getShortNodeId(), routes.RadiosController.show(radio.getId()));
            bc.addCrumb("Thread dump", routes.RadiosController.threadDump(radioId));

            return ok(views.html.system.threaddump.render(currentUser(), bc, radio, radio.getThreadDump()));
        } catch (IOException e) {
            return status(504, views.html.errors.error.render(ApiClient.ERROR_MSG_IO, e, request()));
        } catch (APIException e) {
            String message = "Could not fetch system information. We expected HTTP 200, but got a HTTP " + e.getHttpCode() + ".";
            return status(504, views.html.errors.error.render(message, e, request()));
View Full Code Here

Examples of org.graylog2.restclient.models.Radio

        }
    }

    public Result overrideLbStatus(String radioId, String override) {
        try {
            Radio radio = nodeService.loadRadio(radioId);
            radio.overrideLbStatus(override);
            return redirect(routes.NodesController.nodes());
        } catch (IOException e) {
            return status(504, views.html.errors.error.render(ApiClient.ERROR_MSG_IO, e, request()));
        } catch (APIException e) {
            String message = "Could not set load balancer state. We expected HTTP 200, but got a HTTP " + e.getHttpCode() + ".";
View Full Code Here

Examples of org.graylog2.restclient.models.Radio

    }

    public Result radioThroughput(String radioId) {
        try {
            Map<String, Object> result = Maps.newHashMap();
            final Radio radio = nodeService.loadRadio(radioId);
            result.put("throughput", radio.getThroughput());

            return ok(Json.toJson(result));
        } catch (NodeService.NodeNotFoundException e) {
            return status(404, "node not found");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.