UNPKG

node-red-trexmes-service

Version:
1,238 lines 61.7 kB
<script src="/node-red-trexmes-service/assets/method-data.js"></script>

<script type="text/html" data-template-name="Method Invoker">
    <div class="form-row">
        <div class="form-row">
            <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
            <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
        </div> 

        <div class="form-row">
            <label for="node-input-service"><i class="fa fa-globe"></i> <span data-i18n="method-invoker.label.service"></span></label>
            <select type="text" id="node-input-service" style="width:70%;">
            </select>
        </div>
        <div class="form-row">
            <label for="node-input-method"><i class="fa fa-globe"></i> <span data-i18n="method-invoker.label.method"></span></label>
            <select type="text" id="node-input-method" style="width:70%;">
            </select>
        </div>

        <div id="method-invoker-desc-row" style="display:none; margin:2px 0 6px 0; padding:8px 12px; background:#f4f8f4; border-left:4px solid #58d68d; border-radius:3px; max-height:180px; overflow-y:auto;">
            <div id="method-invoker-desc-text" style="font-size:0.82em; color:#333; margin-bottom:5px;"></div>
            <table id="method-invoker-desc-params" style="font-size:0.80em; width:100%; border-collapse:collapse;"></table>
            <div id="method-invoker-desc-return" style="font-size:0.80em; color:#555; margin-top:5px;"></div>
        </div>

        <div class="form-row node-input-property-container-row">
            <ol id="node-input-property-container"></ol>
        </div>


    </div>   
</script>

<script type="text/javascript">
    (function() {
        
        function resizeDialog(size) {
            size = size || { height: $(".red-ui-tray-content form").height() }
            var height = size.height;
            var descHeight = $("#method-invoker-desc-row").is(":visible") ? ($("#method-invoker-desc-row").outerHeight(true) || 0) : 0;
            $("#node-input-property-container").editableList('height', height - 150 - descHeight);
        }

        function getProps(el) {
            var result = {
                props: []
            };
            el.each(function(i) {
                var prop = $(this);
                var p = {
                    p: prop.find(".node-input-prop-property-name").typedInput('value')
                };
                if (p.p) {
                    p.d = prop.find(".node-input-prop-property-description").typedInput('value');
                    p.dt = prop.find(".node-input-prop-property-description").typedInput('type');
                    result.props.push(p);
                }
            });
            return result;
        }
        
        
        RED.nodes.registerType('Method Invoker',{
            category: 'trexMes service',
            color:"rgb(204, 255, 204)",
            defaults: {
                name: {value:"",required:true},                
                props:{value:[]},
                data:{value:"", required:false},
                dataType:{value:"msg"},
                service: {value:""},
                method: {value:""},
            },
            inputs:1,
            outputs:1,
            icon: "trex.png",
            label: function() {
                if (this.name) {
                    return this.name;
                } else {
                    return "Method Invoker";
                }
            },
            labelStyle: function() {
                return this.name?"node_label_italic":"";
            },
            oneditprepare: function() { 
                var node = this;

                var eList = $('#node-input-property-container').css('min-height','250px').css('min-width','450px');
                eList.editableList({
                    addItem: function(container, i, opt) {
                        var prop = opt;
                        if (!prop.hasOwnProperty('p')) {
                            prop = { p: "", d: "", dt: "str" }; 
                        }
                        container.css({
                            overflow: 'hidden',
                            whiteSpace: 'nowrap'
                        });

                        var row = $('<div/>').appendTo(container);

                        var propertyName = $('<input/>', { class: "node-input-prop-property-name", type: "text" })
                            .css("width", "50%")
                            .appendTo(row)
                            .typedInput({ types: [{ label: 'Key', value: 'str' }] });

                        $('<div/>', { style: 'display:inline-block; padding:0px 6px;' })
                            .text(',')
                            .appendTo(row);

                        var propertyDescription = $('<input/>', { class: "node-input-prop-property-description", type: "text" })
                            .css("width", "calc(50% - 20px)")
                            .appendTo(row)
                            .typedInput({ types:['flow','global','str','num','bool','json','bin','date','jsonata','env','msg']});
                            
                        propertyName.typedInput('value', prop.p);
                        propertyDescription.typedInput('type', prop.dt || 'str');
                        propertyDescription.typedInput('value', prop.d);

                        resizeDialog();
                    },
                    removable: true,
                    sortable: true                                        
                });
     
                for (var i=0; i<node.props.length; i++) {
                    var prop = node.props[i];
                    var newProp = { p: prop.p, d:prop.d, dt:prop.dt };
                    eList.editableList('addItem',newProp);
                }

                var services =[
                          "IAnalysisExtensionService",
                          "IAnalysisViewService",
                          "IBarcodeExtensionService",
                          "IBarcodeViewService",
                          "ICapacityExtensionService",
                          "ICapacityViewService",
                          "IConsumptionExtensionService",
                          "IDatabasePrintService",
                          "IDateTimeService",
                          "IDefectExtensionService",
                          "IDefectViewService",
                          "IDepotExtensionService",
                          "IDocumentExtensionService",
                          "IDocumentViewService",
                          "IEmployeeExtensionService",
                          "IEmployeeViewService",
                          "IEnergyViewService",
                          "IEquipmentExtensionService",
                          "IForkliftExtensionService",
                          "IForkliftViewService",
                          "IFormControlPresenter",
                          "IFormulator",
                          "IIOCardExtensionService",
                          "IIOCardViewService",
                          "IIOSignalService",
                          "IJobOrderExtensionService",
						  "IJobOrderViewService",
                          "IJobOrderSerieExtensionService",
                          "ILabelExtensionService",
                          "ILabelPrintService",
                          "ILabelViewService",
                          "ILanguageService",
                          "ILineExtensionService",
                          "ILineViewService",
                          "ILocalizer",
                          "ILogService",
                          "ILotExtensionService",
                          "ILotViewService",
                          "IMaintenanceExtensionService",
                          "IMaintenanceViewService",
                          "IMainUIDataManager",
                          "IMemoryResolver",
                          "INgpContext",
                          "INotificationMessageViewService",
                          "IOpcSocketSignalService",
                          "IOperationExtensionService",
                          "IOutputService",
                          "IParameterExtensionService",
                          "IPokaYokeViewService",
                          "IPolyvalenceExtensionService",
                          "IPrintServiceProvider",
                          "IProcessDataExtensionService",
                          "IProductionExtensionService",
                          "IProductionPerformanceExtensionService",
                          "IProductionPlanExtensionService",
                          "IProductionPlanViewService",
                          "IProductionReceiptExtensionService",
                          "IProductionSectionExtensionService",
                          "IProductionSpecificationExtensionService",
                          "IProductionSpecificationViewService",
                          "IProductionViewService",
                          "IProductTreeExtensionService",
                          "IQualityExtensionService",
                          "IQualityViewService",
                          "IScaleService",
                          "IScaleViewService",
                          "ISerieReworkExtensionService",
                          "IShiftEventExtensionService",
                          "ISignalPortExtensionService",
                          "ISignalProcessExtensionService",
                          "ISmartAssemblyService",
                          "ISocketSender",
                          "ISqlDataContext",
                          "IStationSelectionUIDataManager",
                          "IStockCycleExtensionService",
                          "IStockExtensionService",
                          "IStockViewService",
                          "IStoppageExtensionService",
                          "IStoppageViewService",
                          "IVersionResolver",
                          "IWorkStationExtensionService",
                          "IWorkStationStatusExtensionService",
                          "IWorkStationStatusViewService"
                        ];
        
                // Her servise karşılık gelen metotlar (index sırasına göre gruplandı)
                var methods =[
                        [
                          "GetDefectAnalysisViewsByTimePeriod",
						  "GetEmployeeAnalysisViewsByTimePeriod",
                          "GetProductionAnalysisViewsByTimePeriod",
                          "GetProductionStoppageAnalysisViewsByTimePeriod",
                          "GetDefectAnalysesByTimePeriod",
                          "GetShiftDefectAnalyses",
                          "GetShiftOeeAnalyses",
                          "GetStoppageAnalysesByTimePeriod",
                          "GetShiftEmployeeAnalyses",
                          "CalculateShiftProductivity"
                        ],
                        [
                          "HandleProductivityAnalysisButtonInteraction",
                          "GetStoppageCountAnalysisViewModelsByTimePeriod",
                          "GetShiftEmployeeViewModels",
                          "GetDefectAnalysisViewModelsByTimePeriod"
                        ],
                        [
                          "LoadPlanViaJobOrderOrStockBarcode",
                          "LoadPlanViaProductionOrderBarcode",
                          "LoadPlanViaWorkorderSerieBarcode",
                          "ProcessKanbanBarcode",
                          "ProcessSerieBarcode",
                          "ProcessStockBarcode",
                          "ProcessJobOrderBarcode",
                          "ProcessStockBasedSerieBarcode"
                        ],
                        [
                          "CheckWebBarcodeQueue",
                          "LoadPlanViaJobOrderOrStockBarcode",
                          "LoadPlanViaProductionOrderBarcode",
                          "LoadPlanViaWorkorderSerieBarcode",
                          "ProcessBarcodeScan",
                          "ProcessStockBasedSerieBarcodeScan",
                          "NonCompleteProductionBarcode"
                        ],
                        [
                          "GetEstimatedPlanCompletionTime",
                          "GetCurrentCycle",
                          "GetCurrentRotationSpeed",
                          "GetCurrentSpeed",
                          "GetPlannedCycle",
                          "GetPlannedRotationSpeed",
                          "GetPlannedSpeed",
                          "GetTotalStockCoefficient"
                        ],
                        [
                          "GetCurrentAndPlannedCycleText",
                          "GetCurrentAndPlannedRotationSpeedText",
                          "GetCurrentCycleText",
                          "GetCurrentRotationSpeedText",
                          "GetCurrentSpeedText",
                          "GetPlannedCycleText",
                          "GetPlannedRotationSpeedText",
                          "GetPlannedSpeedText"
                        ],
                        [
                          "AnyPlanUseStockExists",
                          "DeletePlanUseStockByRefItemNo",
                          "UpdatePlanUseStockQuantity",
                          "GetMaterialsByPlanId",
                          "GetMaterialViews",
                          "GetMaterialViewsDueToCurrentConsumption",
                          "GetPlanConsumptionMaterials",
                          "GetPlanMaterialViews",
                          "CreatePlanUseStock",
                          "GetConsumptionSummaryByPlanReceiptId"
                        ],
                        [
                          "Print",
                          "IsLabelPrintEntryExistent",
                          "GetLabelPrintEntryById"
                        ],
                        [
                          "StartOfMonth",
                          "StartOfWeek",
                          "StartOfYear",
                          "GetServerSystemTime",
                          "GetCurrentDate",
                          "GetCurrentDateTime",
                          "GetCurrentDateTimeWithMilliSeconds",
                          "SetLocalTimeFromServerTime",
                          "IsFirstDateNewer",
                          "GetDateSqlFormat",
                          "GetCurrentDayOfWeek",
                          "GetCurrentWeekOfYear",
                          "GetDateTimeLocalizedMinute",
                          "GetDateTimeLocalizedSecond"
                        ],
                        [
                          "AnyDefectExistentForSerie",
                          "CreateDefectEntry",
                          "DeleteDefectEntry",
                          "GetDefectById",
                          "GetDefectByNo",
                          "GetTotalDefectAmountExcludingDefectId",
                          "GetDefectDetailEntriesBySerieId",
                          "GetDefectEntryAmount",
                          "GetDefectEntriesBySerieId",
                          "GetTotalMaterialDefectEntryAmount",
                          "GetDefectsByWorkStationIdAndType",
                          "GetSelectableDefects",
                          "GetTotalSerialDefectEntryAmount",
                          "SetCurrentDefects",
                          "GetCurrentDefectEntriesByLanguageId",
                          "GetDefectTypeById",
                          "CreateDefectEntry"
                        ],
                        [
                          "GetCurrentScrapAmountText",
                          "GetCurrentScrapAmountText",
                          "GetMaterialDefectEntriesByPlanReceiptId",
                          "HandleDefectButtonInteraction"
                        ],
                        [
                          "GetDepotById",
                          "GetDepotByNo"
                        ],
                        [
                          "GetJobOrderLinkedFilePathsByJobOrderId",
                          "GetJobOrderLinkedFilePathsByJobOrderIds",
                          "GetStockLinkedFilePathsByStockId",
                          "GetStockLinkedFilePathsByStockIds",
                          "GetStockPicturesByStockId"
                        ],
                        [
                          "HandleDocumentsButtonInteraction",
                          "ShowAndValidateDocumentsByConfiguration",
                          "ShowDocumentsByConfiguration",
                          "ShowAndValidateDocumentsByProductionPlan",
                          "ShowDocumentsByProductionPlan",
                          "ShowAndValidateDocumentsByStock",
                          "ShowDocumentsByStock",
                          "ShowAndValidateStockLinkedFiles",
                          "ShowStockLinkedFiles",
                          "ShowAndValidateStockLinkedFiles",
                          "ShowStockLinkedFiles",
                          "ShowAndValidateJobOrderLinkedFiles",
                          "ShowJobOrderLinkedFiles",
                          "ShowAndValidateJobOrderLinkedFiles",
                          "ShowJobOrderLinkedFiles"
                        ],
                        [
                          "ChangeEmployee",
                          "GetEmployeeByCardNo",
                          "GetEmployeeByEmployeeId",
                          "GetEmployeeByEmployeeNo",
                          "GetEmployeeByEmployeeNoOrCardNo",
                          "GetEmployeeByMaintenanceEmployeeId",
                          "GetEmployees",
                          "GetMaintenanceEmployeeByEmployeeId",
                          "GetMaintenanceEmployeeByEmployeeNo",
                          "GetMaintenanceEmployeeByMaintenanceEmployeeId",
                          "GetMaintenanceEmployeeIdByEmployeeId",
                          "IsEmployeeLoggedInAnotherPanel",
                          "IsEmployeeLoggedInAnotherStation",
                          "IsEmployeePasswordValid",
                          "IsEmployeePasswordValid",
                          "LoginEmployee",
                          "LogoutEmployee",
                          "SetCurrentTeam",
                          "SetEmployeeDefinitions",
                          "LogoutEmployee"
                        ],
                        [
                          "GetEmployeeApproval",
                          "GetEmployeeApprovalToStartStoppage",
                          "GetEmployeeApprovalToEndStoppage",
                          "GetShiftChiefApproval",
                          "HandleEmployeeOperationsButtonInteraction",
                          "HandleNotifyEmployeeButtonInteraction",
                          "ValidateEmployee"
                        ],
                        [
                          "HandleEnergyButtonInteraction"
                        ],
                        [
                          "GetAvailableEquipments",
                          "GetEquipmentById",
                          "GetEquipmentByIdAndType",
                          "GetEquipmentByNo",
                          "GetEquipmentByNoAndType",
                          "GetEquipmentIdByNo",
                          "GetEquipmentIdByNoAndType",
                          "GetEquipmentIdByWorkStationId",
                          "GetEquipmentsByWorkStationId",
                          "GetEquipmentsByWorkStationIdAndType",
                          "UpdateEquipment"
                        ],
                        [
                          "ApproveForkliftOrdersCompletion",
                          "CreateForkliftOrder",
                          "CreateForkliftOrderDetail",
                          "DeleteForkliftStock",
                          "GenerateForkliftOrderId",
                          "IsForkliftOrderAccepted",
                          "IsForkliftOrderConfirmed",
                          "IsForkliftOrderCreated",
                          "UpdateForkliftOrder",
                          "GetForkliftStockTransfer"
                        ],
                        [
                          "GetForkliftStockViewModels",
                          "HandleForkliftButtonInteraction"
                        ],
                        [
                          "SetActiveForm",
                          "FormShowDialog",
                          "SetFormSize",
                          "SetIsDynamicFontSizeActive",
                          "SetControlSize",
                          "SetNumericKeyboard",
                          "HideNumericKeyboard",
                          "SetGridKeyboard",
                          "SetActiveGridKeyboardComponent",
                          "HideGridKeyboards",
                          "HideGridKeyboard",
                          "SetGridNumericKeyboard",
                          "HideGridNumericKeyboard",
                          "SetKeyboard",
                          "SetActiveKeyboardComponent",
                          "HideKeyboard",
                          "SetKeypad",
                          "SetKeypad",
                          "SetActiveKeypadComponent",
                          "HideKeypad",
                          "IsKeypadActive",
                          "IsKeyBoardActive",
                          "SendEnterKey",
                          "SetButtonSettings",
                          "FormHide",
                          "FormClose",
                          "GetSplashForm",
                          "GetUserInput",
                          "GetUserApproval",
                          "GetUserInputWithApproval",
                          "GetUserStartEndInputWithApproval",
                          "ShowUserWarning",
                          "ShowUserInfo",
                          "SetFontSize",
                          "SetFontSize",
                          "ShowUserMessage",
                          "ShowUserMessage",
                          "HideMessage",
                          "HideMessage",
                          "HideMessage",
                          "SetTextValue",
                          "GetScreenWidth",
                          "GetScreenHeight",
                          "ComboDoldur",
                          "GetUserButtonSelection",
                          "GetUserSelection",
                          "FocusOnControl",
                          "GetUserSelectableSelection",
                          "HideControl",
                          "RefreshControl",
                          "ShowControl"
                        ],
                        [
                          "IsCycleUnitPiece",
                          "IsCycleUnitMeter",
                          "GetSpeedTimeMultiplier",
                          "GetCycleUnitName",
                          "GetCycleUnitTimeName"
                        ],
                        [
                          "GetIOCardCommands",
                          "LogIOCardData"
                        ],
                        [
                          "HandleIOCardInformationButtonInteraction"
                        ],
                        [
                          "ResetDefectInputSignals",
                          "ResetCounterInputSignals",
                          "SetCounterPortValues",
                          "IsWorkStationWorkingDueToWorkingSignalCheck",
                          "SetInputSignalValuesOnProductionConfirmation",
                          "GetOpcIsWorkingSignalStatus",
                          "GetOpcIsWorkingSignalValue",
                          "AnyStoppageSignalActive",
                          "GetStoppageSignalStatus"
                        ],
                        [
                          "GetJobOrderDetailById",
                          "GetJobOrderDetailByNo",
                          "GetJobOrderIdByJobOrderNo",
                          "GetJobOrderSummaryById",
                          "GetJobOrderMaterialByItemNo",
                          "GetJobOrderMaterialByStockId",
                          "GetJobOrderMaterialsByJobOrderId",
                          "GetJobOrderMaterialsByJobOrderIds",
                          "GetJobOrderMaterialsByProductTree",
                          "GetJobOrderMaterialSummariesByJobOrderId",
                          "GetJobOrderMaterialSummariesByJobOrderIds",
                          "GetJobOrderMaterialSummariesDueToCurrentConsumption",
                          "GetJobOrderMaterialSummariesDueToCurrentConsumption",
                          "GetJobOrderNoByJobOrderId",
                          "GetJobOrderPokaYokeDefinitions",
                          "GetJobOrderPokaYokeItemDefinitionsByJobOrderId",
                          "GetJobOrderPokaYokeMaterials",
                          "GetJobOrdersByGroupNo",
                          "GetJobOrdersByProductionOrderNo",
                          "GetLotTraceableMaterialsByJobOrderId",
                          "GetLotTraceableMaterialsByJobOrderIds",
                          "GetJobOrderTreeUnitQuantity",
                          "GetJobOrderById",
                          "GetNextOperationJobOrder",
                          "GetPreviousOperationJobOrder",
                          "GetProducibleSubJobOrders",
                          "GetProductionDefectAmountByWorkStationIdAndJobOrderIds",
                          "GetProductionConfirmationSummaryByWorkStationIdAndJobOrderIds",
                          "IsJobOrderActive",
                          "IsJobOrderExistent",
                          "UpdateJobOrderEquipment",
                          "UpdateJobOrderMaterial",
                          "UpdateJobOrderStatus",
                          "UpdateJobOrderAmountAndStatus"
                        ],
						[
						  "ShowJoborderSelection"
						],
                        [
                          "CreateJobOrderSerie",
                          "DeleteJobOrderSerie",
                          "GetLastProductSerie",
                          "GetSerieById",
                          "GetSerieByIdAndWorkStationId",
                          "GetSerieByNo",
                          "GetSerieByNoAndWorkStationId",
                          "IsSerieUnique",
                          "IsSerieScannedOnTime",
                          "SetLastSerieScanTime"
                        ],
                        [
                          "GetLabelNoByReceiptType",
                          "GetLabelNoToPrintEachCounter",
                          "GetLabelPrintByNo",
                          "GetMaxReprintableLabelCount",
                          "GetPlanInfoLabelNo",
                          "GetProductionReceiptInterSectionLabelNo",
                          "GetProductionReceiptLabelNo",
                          "GetProductionReceiptLabelNo",
                          "GetProductionReceiptSectionLabelNo",
                          "GetReprintDayCondition",
                          "GetScrapLabelNo",
                          "GetStationConfiguration",
                          "IsLabelValidToPrintByPrintCount",
                          "IsOnlyShiftChiefCanReprintEnabled",
                          "SetStationLabelConfiguration",
                          "SetStockLabelConfigurations"
                        ],
                        [
                          "PrintProductionReceiptLabel",
                          "PrintProductionReceiptLabel",
                          "PrintProductionReceiptSectionLabel",
                          "PrintProductionReceiptInterSectionLabel",
                          "PrintDefectLabel",
                          "PrintCounterLabel",
                          "PrintPlanInfoLabel"
                        ],
                        [
                          "HandlePrintPlanInformationButtonInteraction",
                          "HandleRePrintReceiptButtonInteraction"
                        ],
                        [
                          "SetCurrentLanguage",
                          "GetTranslationByMessage",
                          "GetTranslationByComponent",
                          "GetTranslationsByLanguageCode",
                          "GetCardNameLangDesc",
                          "GetCardNameLangSql",
                          "GetCustomTranslationsByLanguageCode",
                          "CreateCustomTranslation",
                          "GetNgpLanguageCustomEntity",
                          "GetNgpLanguageEntity",
                          "GetCustomButtonTranslations",
                          "AddTranslation",
                          "GetLanguageCode"
                        ],
                        [
                          "DeleteLineStopStatus",
                          "GetBackStationIds",
                          "GetNextStationIds",
                          "GetDeviceLineWorkStation",
                          "GetLinePlanStates"
                        ],
                        [
                          "SelectLine",
                          "ShowLineSelection"
                        ],
                        [
                          "SetLanguage",
                          "LocalizeResourceCollection",
                          "LocalizeAllComponents",
                          "LocalizeFormComponents",
                          "SetAlphabetCode",
                          "GetAlphabet",
                          "SetControlEnability"
                        ],
                        [
                          "WriteLog",
                          "WriteLog",
                          "WriteError",
                          "WriteError",
                          "Info",
                          "Warning",
                          "LogCallStart",
                          "LogCallEnd",
                          "LogSkipMethod",
                          "Debug",
                          "Error",
                          "Error",
                          "Exception",
                          "Fatal",
                          "Fatal"
                        ],
                        [
                          "DeleteLotEntryByItemNo",
                          "CreateLotEntry",
                          "CreateStockLot",
                          "CheckLotSummary",
                          "DeleteLotEntry",
                          "DeleteLotEntriesByWorkStationId",
                          "DeleteLotEntriesByWorkStationIdAndJobOrders",
                          "DeletePlanLotsByPlanReceiptId",
                          "IsEachLotBalanceValid",
                          "GeneratePlanLotsFromLotEntriesByActualConsumption",
                          "GeneratePlanLotsFromLotEntriesByActualConsumption",
                          "GetAvailableLots",
                          "GetLotEntryByWorkStationIdAndLotNo",
                          "GetLotEntriesByWorkStationIdAndJobOrderId",
                          "GetLotEntriesByWorkStationIdAndJobOrderIdAndItemNo",
                          "GetLotEntriesByWorkStationId",
                          "GetLotSummary",
                          "GetStockLotByLotNo",
                          "GetStockLotByStockLotId",
                          "IsLotEntryExistent",
                          "IsLotEntryExistent",
                          "IsLotEntryExistent",
                          "IsLotSelectedForAllTraceableMaterials",
                          "IsStockLotExistent",
                          "ProcessMaterialLotSelection",
                          "SetConsumptionLots",
                          "UpdateLotEntryAmounts",
                          "UpdateLotEntryAmountsByWorkStationId",
                          "UpdateLotEntryExitAmount",
                          "UpdatePreDefinedPlanLotsReceiptId",
                          "UpdateStockLot",
                          "UpdateStockLotStockId",
                          "GetTotalLotAmountByWorkStationId",
                          "ReGenerateAllConsumptionAndLotEntries",
                          "ResolveMaterialSummaryAsMaterialModel",
                          "SetMaterialConsumptionOutputsDueToOtherStationsProduction",
                          "SetMaterialConsumptionOutputs",
                          "RefreshLotEntries",
                          "DeleteConsumedLotEntries",
                          "AddConsumptionToLotEntries"
                        ],
                        [
                          "HandleMaterialButtonInteraction"
                        ],
                        [
                          "CompleteMaintenanceOrder",
                          "CreateMaintenanceOrder",
                          "GetActiveMaintenanceOrdersByEquipmentId",
                          "GetMaintenanceDirectionById",
                          "GetMaintenanceDirections",
                          "GetMaintenanceOrderById",
                          "GetMaintenancePlanById",
                          "GetMaintenanceServiceItems",
                          "GetMaintenanceStocks",
                          "GetMaintenanceTypeById",
                          "GetMaintenanceUnitByEquipmentId",
                          "GetMaintenanceUnitByUnitId",
                          "GetMaintenanceUnitByWorkStationId",
                          "GetMaintenanceUnitsByWorkStationId",
                          "GetMalfunctionCauseById",
                          "GetMalfunctionCausesByWorkStationId",
                          "SetMaintenancePlanConfiguration",
                          "SetMaintenanceTypeDefinitions",
                          "UpdateMaintenanceOrderDirectionId",
                          "UpdateMaintenanceOrderMalfunctionCauseId",
                          "UpdateMaintenanceOrderPlanId",
                          "UpdateMaintenanceOrderUnitId",
                          "UpdateMaintenanceTypeId",
                          "UpdateCurrentOrderDescriptionAndNote",
                          "GenerateAndCreateMaintenanceOrder",
                          "SetCurrentMaintenanceEmployee",
                          "IsMaintenanceTypeRequirementsSatisfied",
                          "CheckMaintenanceOrderFieldRequirements"
                        ],
                        [
                          "CheckPeriodicalMaintenance",
                          "IsEmployeeAuthorizedToStartStoppage",
                          "HandleMaintenanceButtonInteraction",
                          "HandleCompleteMaintenanceButtonInteraction",
                          "IsEmployeeAuthorizedToOperateStoppage",
                          "SetEmployeeForMaintenanceStoppageIfAuthorized",
                          "ShowMaintenanceDirectionPictures",
                          "ShowMaintenanceDirectionVideos",
                          "ShowMaintenanceDirectionSteps",
                          "ShowMaintenanceDirectionSteps"
                        ],
                        [
                          "SetConfiguration",
                          "SetConfiguration",
                          "AddUIData",
                          "ReplaceUIData",
                          "RemoveUIData",
                          "IfContainsDisplayIndex",
                          "GetDataTypeByDisplayIndex",
                          "GetUIDataByDisplayIndex"
                        ],
                        [
                          "GetAvailableMemory"
                        ],
                        [
                          "GetStationIndex",
                          "GetStationIndex",
                          "SetTransientProductionContext"
                        ],
                        [
                          "HandleMessagesButtonInteraction"
                        ],
                        [
                          "InitializeSignalProcessManager",
                          "StopProcess",
                          "StartProcess",
                          "InterpretSocketMessage",
                          "InitializeSocketListener",
                          "EnqueueSignalOperation"
                        ],
                        [
                          "GetOperationById"
                        ],
                        [
                          "ActivateOutputForCounterIncrement",
                          "CheckAllOutputStates",
                          "CheckOutputsOnProductionStart",
                          "CheckOutputsOnProductionEnd",
                          "SetDigitalOutputValue"
                        ],
                        [
                          "GetSystemConfiguration",
                          "GetNgpConfiguration"
                        ],
                        [
                          "ProcessPokaYokeResult"
                        ],
                        [
                          "IsEmployeeQualifiedForProductionPlan",
                          "IsEmployeeQualifiedForStock",
                          "IsEmployeeQualifiedForStoppageCause",
                          "IsEmployeeQualifiedForWorkStation",
                          "IsTeamQualifiedForProductionPlan",
                          "IsTeamQualifiedForStock",
                          "IsTeamQualifiedForStoppageCause",
                          "IsTeamQualifiedForWorkStation"
                        ],
                        [
                          "PrintLabel"
                        ],
                        [
                          "SetPlcOnProductionStart",
                          "SetPlcOnCoefficientChange",
                          "SetPlcOnProductionEnd",
                          "SetPlcOnStoppageStart",
                          "SetPlcOnStoppageEnd",
                          "ResetProcessData",
                          "SetMinMaxExpectedValue",
                          "GetSelectableOpcProcessDataDefinitions"
                        ],
                        [
                          "GetNextProductionPlanId",
                          "IncreaseCounterByStockIndex",
                          "IncreaseCounterByStockNo",
                          "IsPlanStartAllowed",
                          "IsProductionConfirmationAllowed",
                          "IsConfirmingProduction",
                          "LoadPlanStartProduction",
                          "LoadProductionPlanByJobOrderId",
                          "LoadProductionPlanByStockId",
                          "ConfirmAndCreateSectionReceipt",
                          "ConfirmAndCreateInterSectionReceipt",
                          "SetPlanDetails",
                          "SetProductionSummary",
                          "GetLastProductionReceiptRecordTime",
                          "LoadNextProductionPlan",
                          "IsAnyStationConfirmingProduction",
                          "ConfirmProduction",
                          "LoadPlanStartProduction",
                          "EndProduction",
                          "SaveProduction"
                        ],
                        [
                          "GetProductionPerformance",
                          "CalculateProductionPerformanceFromTransientContext"
                        ],
                        [
                          "DeleteAndClearNextProductionPlans",
                          "AddNextProductionPlan",
                          "CreateProductionPlan",
                          "CreateProductionPlanFromJobOrder",
                          "CreateProductionPlanFromJobOrders",
                          "CreateProductionPlanItem",
                          "DeleteNextProductionPlan",
                          "GetFirstProductionPlanByStockIdExceptCurrentPlan",
                          "GetJobOrderIdsByPlanId",
                          "GetJobOrderPokaYokeDefinitionsByPlanId",
                          "GetNextProductionPlanByPlanId",
                          "GetNextProductionPlans",
                          "GetPlanCountByJobOrderId",
                          "GetProductionPlanById",
                          "GetProductionPlanEquipment",
                          "GetProductionPlanEquipmentId",
                          "GetRequiredEmployeeCountByPlanId",
                          "IsPlanCapacityConvenient",
                          "IsProductionPlanActive",
                          "IsProductionPlanExistent",
                          "SetProductionInformation",
                          "SetProductionInformationForAllStations",
                          "UpdatePlanCapacityAndSpeed",
                          "UpdatePlanCyclePeriod",
                          "UpdatePlanItemCoefficient",
                          "UpdatePlanItemCyclePeriod",
                          "UpdateProductionPlanEquipmentId",
                          "UpdateProductionPlanNote",
                          "UpdateProductionPlanCoePulse",
                          "GetPlanIdByJobOrderId",
                          "GenerateProductionPlanId",
                          "GetParentPlanId",
                          "GetProductionPlanItemsById",
                          "GenerateProductionPlanQuery",
                          "SwapNextProductionPlans",
                          "CreateNextProductionPlan",
                          "UpdatePlanAmountAndStatusByJobOrderId",
                          "GetLoadableProductionPlanItems",
                          "SetProductionPlanStatusDueToProductionConfirmation",
                          "CreateProductionPlanFromJobOrders"
                        ],
                        [
                          "HandlePlanInformationButtonInteraction",
                          "HandleNextPlanSelectionButtonInteraction",
                          "HandleChangeStockUnitCoeButtonInteraction",
                          "HandleProductionParametersButtonInteraction",
                          "SelectNextProductionPlans",
                          "ShowPlanSelection"
                        ],
                        [
                          "CreateProductionReceipt",
                          "CreateReceiptProductionDefect",
                          "DeleteReceiptProductionDefect",
                          "GetLastProductionReceiptIdByWorkStationId",
                          "GetTotalPlanStockProduction",
                          "GetTotalProductionDefectAmountByPlanIdAndWorkStationId",
                          "GetTotalProductionDefectAmountByPlanId",
                          "GetProductionReceiptBriefByPlanId",
                          "GetProductionReceiptBriefByPlanIdAndStockId",
                          "GetProductionReceiptBriefByPlanIdAndWorkStationId",
                          "GetProductionReceiptBriefByPlanIdAndStockIdAndWorkStationIds",
                          "GetProductionReceiptById",
                          "GetProductionReceiptByNo",
                          "GetProductionSubReceiptBriefByPlanId",
                          "GetTotalProductionDefectAmountByReceiptId",
                          "IsProductionReceiptExistent",
                          "SetProductionAmountByPlanId",
                          "SetReceiptLabelPrintCount",
                          "UpdateReceiptProductionDefect",
                          "UpdateProductionReceiptQuantity",
                          "UpdateProductionReceiptIntegrationStatus",
                          "GetProductionReceiptUserDefinedFields",
                          "GetProductionReceiptUserDefinedFieldOptions",
                          "IntegrateProductionReceipt",
                          "GetProductionReceiptUserDefinedDataHistory",
                          "IsUserDefinedFieldTypeMatching"
                        ],
                        [
                          "CreateProductionSectionEntry",
                          "GetDefinableUndefinedStoppages",
                          "GenerateProductionSectionDefectEntry",
                          "GenerateProductionSectionEntry",
                          "CreateProductionSectionDefectEntry",
                          "GetProductionSectionEntries",
                          "GetLastPlanIdExceptCurrentPlan",
                          "GetTotalProductionSectionStopDuration",
                          "UpdateProductionSectionEntriesDueToPlanReceipt"
                        ],
                        [
                          "AnyUnSatisfiedRequirementExists",
                          "GetProductionSpecificationResultsByGroupItemNo",
                          "GetProductionSpecificationInstructions",
                          "GetProductionSpecificationInstructionsAsDataTable",
                          "GetProductionSpecificationResults",
                          "GetSpecificationNameByInstructionId",
                          "GetExpectedSpecificationValues",
                          "SetProductionSpecificationResults",
                          "GetExpectedSpecificationValues"
                        ],
                        [
                          "HandleProductionSpecButtonInteraction",
                          "ShowSpecificationGroupSelection",
                          "ShowProductionSpecifications"
                        ],
                        [
                          "ChangePlanStartProduction",
                          "CheckIfPlanCompleted",
                          "CheckIfShiftChangeTimeHasCome",
                          "CheckNgpCommands",
                          "CheckReceivedMessages",
                          "GenerateProductionStockViewModels",
                          "GetExpectedFinishTimeValueText",
                          "HandleCurrentPlanChangeButtonInteraction",
                          "HandleOtherOperationsButtonInteraction",
                          "HandleProductionButtonInteraction",
                          "ShowJobSelection",
                          "ShowStockEquipmentMatch"
                        ],
                        [
                          "GetProductAssemblyOrders",
                          "CreateAssemblyHistoryEntry"
                        ],
                        [
                          "CreateUserDefinedQualityReceipt",
                          "CreateInitialApprovalReceipt",
                          "GetLastInitialApprovalReceiptResult",
                          "GetTechnicalControlDefinitions"
                        ],
                        [
                          "HandleQualityControlButtonInteraction"
                        ],
                        [
                          "SetScalePorts",
                          "IsSharedScaleUsageEnabled",
                          "GetScaleMeasurements",
                          "SetScaleMeasurements",
                          "SetScaleMeasurement",
                          "GetScaleSerialPortData",
                          "GetScalePortCount",
                          "SetProductionCounterFromScaleWeight",
                          "ResetScaleMeasurements",
                          "InitializeScalePortConfiguration"
                        ],
                        [
                          "SetScaleDataViaScaleSelection"
                        ],
                        [
                          "CreateSerieReworkEntry",
                          "CreateSerieReworkEntryDetail",
                          "GetSerieReworkEntryBySerieId",
                          "GetSerieReworkEntryDetailsBySerieId",
                          "GetSerieReworkViewBySerieId",
                          "UpdateSerieReworkEntry",
                          "UpdateSerieReworkEntryDetail"
                        ],
                        [
                          "CreateShiftEvent",
                          "GetShiftEvents",
                          "GetShiftEventTypes"
                        ],
                        [
                          "GetDigitalInputValues",
                          "GetCounterPort",
                          "GetDefectSignalPort",
                          "GetEquipmentStockIndexPorts",
                          "GetInputCountByPortNo",
                          "GetDigitalInputValue",
                          "GetDigitalInputInstantSpeed",
                          "GetHscInstantSpeed"
                        ],
                        [
                          "IncreaseCounterBySignalPort",
                          "StartUndefinedStoppage",
                          "StartStoppageIfAnyStoppageSignalActive"
                        ],
                        [
                          "StartSAS",
                          "IsModuleInitialized",
                          "IsStationInitialized",
                          "InitializeAssemblyService",
                          "InitializeAssemblyWorkStation",
                          "ProcessDigitalInputChange",
                          "ProcessDigitalOutputChange",
                          "ProcessBarcode",
                          "ProcessBarcodeByBrainType",
                          "IsCounterIncrementConvenient",
                          "SetActiveStationBrain",
                          "IncreaseDefectCounterDueToSAS",
                          "IsToSubstringBarcode"
                        ],
                        [
                          "Initialize",
                          "Send"
                        ],
                        [
                          "GetDataTable",    
                          "RunCommand"
                        ],
                        [
                          "SetConfiguration",
                          "SetConfiguration",
                          "AddUIData",
                          "ReplaceUIData",
                          "RemoveUIData",
                          "SetDefaultConfiguration",
                          "IfContainsDisplayIndex",
                          "GetDataTypeByDisplayIndex",
                          "GetUIDataByDisplayIndex"
                        ],
                        [
                          "GetPlanCapacity",
                          "GetPlanCyclePeriod",
                          "GetPlanStockCoefficient",
                          "GetWorkStationPlanCycle",
                          "GetWorkStationStockCycle",
                          "IsWorkStationPlanCycleExistent",
                          "IsWorkStationStockCycleExistent",
                          "SetCyclePeriod",
                          "SetWorkStationPlanCycleFromStockCycle",
                          "SetWorkStationPlanCycle",
                          "UpdateWorkStationPlanCycleCapacity",
                          "UpdateWorkStationPlanCycleCoefficient",
                          "UpdateWorkStationPlanCyclePeriod"
                        ],
                        [
                          "CreateStock",
                          "GetAlternateStocksByStockId",
                          "GetStockDetailByCustomerStockNo",
                          "GetStockById",
                          "GetStockDetailById",
                          "GetStockDetailByNo",
                          "GetStockDetailBySupplierStockNo",
                          "GetStockDetailByCaseSensitiveNo",
                          "GetStockGradeById",
                          "GetStockUnitName",
                          "GetStockUnitDetailsByStockId",
                          "GetUnitSummaryByUnitId",
                          "IsAlternateStock",
                          "IsStockExistent",
                          "IsStockExistent",
                          "IsStockMultiLotTraceable"
                        ],
                        [
                          "GetStockIndexSelection"
                        ],
                        [
                          "EndStoppageDueToSystemInteraction",
                          "GetEstimatedStoppageDuration",
                          "GetSelectableStoppageCauses",
                          "GetStoppageCauseById",
                          "GetStoppageCauseDetails",
                          "GetStoppageCauseIdByNo",
                          "GetStoppageCauses",
                          "GetStoppageCauseDefectId",
                          "GetStoppageCauseStationDetail",
                          "GetStoppageCauseStockDetail",
                          "IsStoppageCausePlanned",
                          "IsStoppageCauseSystemStoppage",
                          "IsCurrentStoppageNoShiftStoppage",
                          "SetWorkStationStatus",
                          "SetStoppageCauseDefinitionDetails",
                          "SetStoppageCauseDefinitions",
                          "LogStoppageEvent",
                          "GetDefinableSignalStoppageIds",
                          "CreateStoppageEventEntry",
                          "UpdateStoppageEventEntry"
                        ],
                        [
                          "ChangeDefinedStoppages",
                          "DefineUndefinedStoppages",
                          "EndStoppageDueToOperatorInteraction",
                          "HandleStoppageButtonInteraction",
                          "HandleStoppageChangeButtonInteraction",
                          "HandleTestModeButtonInteraction",
                          "GetStoppageDetail"
                        ],
                        [
                          "GetVersion",
                          "GetVersionDate",
                          "GetFormattedVersion"
                        ],
                        [
						  "GetWorkCenterById",
						  "GetWorkCenterByWorkStationId",
                          "GetWorkStationById",
                          "GetAllWorkStations",
                          "GetWorkStationsByWorkCenterId",
                          "UpdateStationEquipment"
                        ],
                        [
                          "GetInputCounterStatusEntries",
                          "GetMaterialItemStatusEntries",
                          "GetMaterialStatusEntries",
                          "GetStationStatusSummary",
                          "GetStatusUpdateCounter",
                          "GetCurrentPanelStationStatusEntriesByJobOrderId",
                          "GetWorkStationEnergyStatusEntries",
                          "GetWorkStationOtherStatusEntry",
                          "GetWorkStationStatusEntry",
                          "GetWorkStationStatusEntryDetail",
                          "GetWorkStationStatusItemEntries",
                          "IfPlanIsWorkingAtAnotherStation",
                          "SetStationStatusSummary",
                          "GetCurrentWorkStationPlansByLineIds",
                          "GetWorkStationStatus"
                        ],
                        [
                          "GetProducibleQuantityText"
                        ]
                      ];
                      
                var serviceSelect = document.getElementById("node-input-service");
                var methodSelect = document.getElementById("node-input-method");
                
                // Servis seçeneklerini ekle
                services.forEach(function(service) {
                    var opt = document.createElement("option");
                    opt.value = service;
                    opt.innerHTML = service;
                    serviceSelect.appendChild(opt);
                });
        
                // Method açıklama panelini güncelleme fonksiyonu
                function updateMethodDescription() {
                    var service = serviceSelect.value;
                    var method = methodSelect.value;
                    if (typeof methodData === 'undefined' || !methodData[service] || !methodData[service][method]) {
                        $("#method-invoker-desc-row").hide();
                        return;
                    }
                    var info = methodData[service][method];

                    // Açıklama metni
                    $("#method-invoker-desc-text").text(info.d || "");

                    // Parametre tablosu
                    var $table = $("#method-invoker-desc-params");
                    $table.empty();
                    if (info.p && info.p.length > 0) {
                        $table.append('<tr style="background:#e8f5e9;"><th style="padding:2px 8px; text-align:left; font-weight:600;">Parametre</th><th style="padding:2px 8px; text-align:left; font-weight:600;">Tip</th></tr>');
                        info.p.forEach(function(param) {
                            $table.append('<tr><td style="padding:2px 8px; font-family:monospace;">' + param.n + '</td><td style="padding:2px 8px; color:#1a6b1a; font-family:monospace;">' + param.t + '</td></tr>');
                        });
                    } else {
                        $table.append('<tr><td style="padding:2px 8px; color:#888; font-style:italic;">Parametre yok</td></tr>');
                    }

                    // Dönüş tipi
                    if (info.r) {
                        $("#method-invoker-desc-return").html('<strong>Dönüş:</strong> <span style="font-family:monospace; color:#1a6b1a;">' + info.r + '</span>');
                    } else {
                        $("#method-invoker-desc-return").text("");
                    }

                    $("#method-invoker-desc-row").show();
                    resizeDialog();
                }

                // Metotları güncelleme fonksiyonu
                function updateMethods() {
                    var selectedIndex = serviceSelect.selectedIndex;
                    methodSelect.innerHTML = ""; // Önceki seçenekleri temizle

                    if (selectedIndex >= 0 && selectedIndex < methods.length) {
                        var sortedMethods = methods[selectedIndex].slice().sort(function(a, b) {
                            return a.localeCompare(b);
                        });
                        sortedMethods.forEach(function(method) {
                            var opt = document.createElement("option");
                            opt.value = method;
                            opt.innerHTML = method;
                            methodSelect.appendChild(opt);
                        });
                    }
                    updateMethodDescription();
                }

                updateMethods(); // İlk açılışta servise göre methodları güncelle


                // Servis seçimi değiştiğinde metot listesini güncelle
                serviceSelect.addEventListener("change", updateMethods);
                // Method seçimi değiştiğinde açıklama panelini güncelle
                methodSelect.addEventListener("change", updateMethodDescription);

                // İlk açılışta, eğer önceden bir servis seçiliyse metotları güncelle
                if (node.service) {
                    serviceSelect.value = node.service;
                    updateMethods();
                    if (node.method) {
                        methodSelect.value = node.method;
                        updateMethodDescription();
                    }
                }
            },
            oneditsave: function() {
                var items = $("#node-input-property-container").editableList('items');
                var result = getProps(items);
                this.props = result.props;

                var serviceSelect = document.getElementById("node-input-service");
                var methodSelect = document.getElementById("node-input-method");

                this.service = serviceSelect.value;
                this.method = methodSelect.value;

            },
            oneditresize: resizeDialog
    
        });
    
       
    
    })();
    </script>