Package autotest.common

Examples of autotest.common.StaticDataRepository$FinishedCallback


        nameCounter++;
        return "JobOwnerFilter" + Integer.toString(nameCounter);
    }

    private void populateUserList() {
        StaticDataRepository staticData = StaticDataRepository.getRepository();
        JSONArray userArray = staticData.getData("users").isArray();
        for (String user : Utils.JSONObjectsToStrings(userArray, "login")) {
            userList.addItem(user);
        }
        String currentUser = staticData.getCurrentUserLogin();
        userList.selectByName(currentUser);
    }
View Full Code Here


        initWidget(selector);
    }

    private void initializePreconfigList(final String preconfigType) {
        selector.addItem(NO_PRECONFIG);
        StaticDataRepository staticData = StaticDataRepository.getRepository();
        JSONObject preconfigs = staticData.getData("preconfigs").isObject();
        Set<String> keys = preconfigs.get(preconfigType).isObject().keySet();
        for (String key : keys) {
            selector.addItem(key);
        }
    }
View Full Code Here

        super(table);
        table.sortOnColumn("hostname")/* Case sensitive name */
        table.setRowsPerPage(rowsPerPage);
        addPaginators();

        StaticDataRepository staticData = StaticDataRepository.getRepository();
        JSONArray statuses = staticData.getData("host_statuses").isArray();
        String[] statusStrings = Utils.JSONtoStrings(statuses);

        JSONArray users = staticData.getData("users").isArray();
        List<String> userStrings = new ArrayList<String>();
        for (int i = 0; i < users.size(); i++) {
            JSONObject user = users.get(i).isObject();
            userStrings.add(Utils.jsonToString(user.get("login")));
        }
View Full Code Here

        queryList.addItem(DELETE_QUERY);
        fillQueryList(queryList);
    }

    private void fillQueryList(final ListBox list) {
        StaticDataRepository staticData = StaticDataRepository.getRepository();
        JSONObject args = new JSONObject();
        args.put("owner", new JSONString(staticData.getCurrentUserLogin()));
        rpcProxy.rpcCall("get_saved_queries", args, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                for (JSONObject query : new JSONArrayList<JSONObject>(result.isArray())) {
                    int id = (int) query.get("id").isNumber().doubleValue();
View Full Code Here

        testSelector.setListener(this);
    }

    public void reset() {
        StaticDataRepository repository = StaticDataRepository.getRepository();

        display.getJobName().setText("");
        resetPriorityToDefault();
        rebootBefore.reset();
        rebootAfter.reset();
        display.getParseFailedRepair().setValue(
                repository.getData("parse_failed_repair_default").isBoolean().booleanValue());
        display.getHostless().setValue(false);
        display.getReserveHosts().setValue(false);
        display.getKernel().setText("");
        display.getKernelCmdline().setText("");
        display.getTimeout().setText(Utils.jsonToString(repository.getData("job_timeout_default")));
        display.getMaxRuntime().setText(
                Utils.jsonToString(repository.getData("job_max_runtime_hrs_default")));
        display.getEmailList().setText("");
        testSelector.reset();
        display.getSkipVerify().setValue(false);
        profilersPanel.reset();
        setInputsEnabled();
View Full Code Here

    public JobStatusDataSource() {
        super("get_host_queue_entries", "get_num_host_queue_entries");

        // retrieve the dictionary from static data
        StaticDataRepository staticData = StaticDataRepository.getRepository();
        dictionary = staticData.getData("status_dictionary").isObject();
    }
View Full Code Here

    protected void addTableFilters() {
        hostsTable.addFilter(jobFilter);

        SearchFilter hostnameFilter = new SearchFilter("host__hostname", true);
        ListFilter statusFilter = new ListFilter("status");
        StaticDataRepository staticData = StaticDataRepository.getRepository();
        JSONArray statuses = staticData.getData("job_statuses").isArray();
        statusFilter.setChoices(Utils.JSONtoStrings(statuses));

        tableDecorator.addFilter("Hostname", hostnameFilter);
        tableDecorator.addFilter("Status", statusFilter);
    }
View Full Code Here

TOP

Related Classes of autotest.common.StaticDataRepository$FinishedCallback

Copyright © 2018 www.massapicom. 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.