123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- /*
- *
- * 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.
- *
- */
- var globalOptionsInfo = null;
-
- Y.one('#configureClusterAdvancedSubmitButtonId').on('click',function (e) {
-
- if (this.hasClass('disabled')) {
- return;
- }
-
- var opts = configureServicesUtil.generateUserOpts();
- e.target.set('disabled', true);
- var url = "../php/frontend/configureServices.php?clusterName="+globalOptionsInfo.clusterName;
- var requestData = opts;
- var submitButton = e.target;
- var thisScreenId = "#configureClusterAdvancedCoreDivId";
- var nextScreenId = "#deployCoreDivId";
- var nextScreenRenderFunction = renderDeploy;
- var errorFunction = configureServicesUtil.handleConfigureServiceErrors;
- submitDataAndProgressToNextScreen(url, requestData, submitButton,
- thisScreenId, nextScreenId, nextScreenRenderFunction, errorFunction);
- });
- // register event handlers for dynamic validation
- // when a key is pressed on a password field, perform password validation
- Y.one("#configureClusterAdvancedDynamicRenderDivId").delegate(
- {
- 'keyup' : function (e) {
- configureServicesUtil.checkPasswordCorrectness();
- configureServicesUtil.updateServiceErrorCount(e.target.get('name'));
- }
- },
- "input[type=password]"
- );
- // when a key is pressed on a text field, just clear the error
- Y.one("#configureClusterAdvancedDynamicRenderDivId").delegate(
- {
- 'keyup' : function (e) {
- configureServicesUtil.clearErrorReason('#' + e.target.get('id'));
- configureServicesUtil.updateServiceErrorCount(e.target.get('name'));
- }
- },
- "input[type=text],input[type=password]:not(.retypePassword)"
- );
- function renderConfigureServicesInternal (optionsInfo) {
- Y.one("#configureClusterAdvancedDynamicRenderDivId").setContent(configureServicesUtil.getOptionsSummaryMarkup(optionsInfo, false));
- $('#configureServicesTabs a:first').tab('show');
- Y.one("#configureClusterAdvancedCoreDivId").show();
- Y.one('#configureClusterAdvancedSubmitButtonId').simulate('click');
- hideLoadingImg();
- }
- function renderOptionsPage (optionsInfo) {
- globalOptionsInfo = optionsInfo;
- var inputUrl = "../php/frontend/fetchClusterServices.php?clusterName=" + optionsInfo.clusterName + "&getConfigs=true";
- executeStage(inputUrl, renderConfigureServicesInternal);
- }
|