Ext.define("MyApp.controller.GUI",{extend:Ext.app.Controller,refs:[{ref:"form",selector:"#form"}],onLaunch:function(){this.getForm().setLoading(CCS.Translator.getText("Loading..."));var a=Ext.Object.fromQueryString(document.location.search);delete a.violation_handle;Ext.Ajax.request({url:"../../service/viewRiskDefinition.php",method:"GET",params:a,success:function(c,d){var b=Ext.JSON.decode(c.responseText);var e=b.result;this.showRiskDefinition(e)},failure:function(b,c){var d=b.responseText;Ext.Error.raise({msg:"Failed to get risk ids",option:d,object:c});this.getForm().setLoading(false)},scope:this})},showRiskDefinition:function(a){this.getForm().getForm().setValues(a);this.getForm().setLoading(false)}});Ext.define("MyApp.view.MyForm",{extend:Ext.form.Panel,border:false,itemId:"form",margin:0,padding:0,bodyBorder:false,layout:{type:"vbox",align:"stretch"},initComponent:function(){var a=this;Ext.applyIf(a,{items:[{xtype:"textfield",fieldLabel:"ID",labelSeparator:" ",name:"rule_id",readOnly:true},{xtype:"textfield",fieldLabel:"Name",labelSeparator:" ",name:"name",readOnly:true},{xtype:"textfield",fieldLabel:"Group",labelSeparator:" ",name:"group_name",readOnly:true},{xtype:"textfield",fieldLabel:"Risk level",labelSeparator:" ",name:"risk_level",readOnly:true},{xtype:"textareafield",flex:1,fieldLabel:"Description",labelSeparator:" ",name:"description",readOnly:true},{xtype:"textfield",fieldLabel:"Risk level",labelSeparator:" ",name:"text_response",readOnly:true},{xtype:"textfield",fieldLabel:"Autorenewal",labelSeparator:" ",name:"autorenewal",readOnly:true},{xtype:"textareafield",flex:1,fieldLabel:"Mitigation",labelSeparator:" ",name:"mitigation",readOnly:true},{xtype:"textfield",fieldLabel:"Origin",labelSeparator:" ",name:"origin",readOnly:true},{xtype:"textfield",fieldLabel:"Status",labelSeparator:" ",name:"status",readOnly:true},{xtype:"textfield",fieldLabel:"Created",labelSeparator:" ",name:"timestamp",readOnly:true},{xtype:"tbspacer",height:10}]});a.callParent(arguments)}});