Commit fa2a6557 fa2a6557a3be4a5a61fdb9633006ea78968eac32 by root

save

0 parents
Showing 1000 changed files with 4369 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>DevTools</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ajdt.core.ajbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.springsource.sts.roo.core.nature</nature>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.ajdt.ui.ajnature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/webapp"/>
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
eclipse.preferences.version=1
org.aspectj.ajdt.core.compiler.BuildOptions.showweavemessages=false
org.aspectj.ajdt.core.compiler.lint.BrokeSerialVersionCompatibility=ignore
org.aspectj.ajdt.core.compiler.lint.CannotImplementLazyTJP=ignore
org.aspectj.ajdt.core.compiler.lint.InvalidAbsoluteTypeName=warning
org.aspectj.ajdt.core.compiler.lint.NeedSerialVersionUIDField=ignore
org.aspectj.ajdt.core.compiler.lint.NoInterfaceCtorJoinpoint=warning
org.aspectj.ajdt.core.compiler.lint.ShadowNotInStructure=ignore
org.aspectj.ajdt.core.compiler.lint.TypeNotExposedToWeaver=warning
org.aspectj.ajdt.core.compiler.lint.UnresolvableMember=warning
org.aspectj.ajdt.core.compiler.lint.WildcardTypeName=ignore
org.aspectj.ajdt.core.compiler.lint.adviceDidNotMatch=warning
org.aspectj.ajdt.core.compiler.lint.annotationAsTargetForDecpIgnored=warning
org.aspectj.ajdt.core.compiler.lint.calculatingSerialVersionUID=ignore
org.aspectj.ajdt.core.compiler.lint.cantFindType=error
org.aspectj.ajdt.core.compiler.lint.cantFindTypeAffectingJPMatch=warning
org.aspectj.ajdt.core.compiler.lint.cantMatchArrayTypeOnVarargs=ignore
org.aspectj.ajdt.core.compiler.lint.elementAlreadyAnnotated=warning
org.aspectj.ajdt.core.compiler.lint.enumAsTargetForDecpIgnored=warning
org.aspectj.ajdt.core.compiler.lint.invalidTargetForAnnotation=warning
org.aspectj.ajdt.core.compiler.lint.multipleAdviceStoppingLazyTjp=ignore
org.aspectj.ajdt.core.compiler.lint.noExplicitConstructorCall=warning
org.aspectj.ajdt.core.compiler.lint.noGuardForLazyTjp=ignore
org.aspectj.ajdt.core.compiler.lint.noJoinpointsForBridgeMethods=warning
org.aspectj.ajdt.core.compiler.lint.runtimeExceptionNotSoftened=warning
org.aspectj.ajdt.core.compiler.lint.swallowedExceptionInCatchBlock=ignore
org.aspectj.ajdt.core.compiler.lint.uncheckedAdviceConversion=warning
org.aspectj.ajdt.core.compiler.lint.uncheckedArgument=warning
org.aspectj.ajdt.core.compiler.lint.unmatchedTargetKind=warning
org.aspectj.ajdt.core.compiler.lint.unorderedAdviceAtShadow=ignore
org.aspectj.ajdt.core.compiler.list.UnmatchedSuperTypeInCall=warning
org.aspectj.ajdt.core.compiler.weaver.XHasMember=false
org.aspectj.ajdt.core.compiler.weaver.XNoInline=false
org.aspectj.ajdt.core.compiler.weaver.XNotReweavable=false
org.aspectj.ajdt.core.compiler.weaver.XSerializableAspects=false
org.aspectj.ajdt.core.compiler.weaver.outxml=true
org.aspectj.ajdt.core.compiler.weaver.timers=false
org.aspectj.ajdt.core.compiler.weaver.verbose=false
org.aspectj.ajdt.core.complier.lint.aspectExcludedByConfiguration=ignore
org.eclipse.ajdt.core.builder.incrementalCompilationOptimizations=true
org.eclipse.ajdt.core.compiler.nonStandardOptions=
org.eclipse.ajdt.core.compiler.useProjectSettings=true
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="DevTools">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
<property name="context-root" value="DevTools"/>
<property name="java-output-path" value="/DevTools/target/classes"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.5"/>
<installed facet="jst.web" version="2.3"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
disabled=06target
eclipse.preferences.version=1
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.emercit</groupId>
<artifactId>DevTools</artifactId>
<packaging>war</packaging>
<version>1.0.0-BUILD-SNAPSHOT</version>
<properties>
<java-version>1.6</java-version>
<org.springframework-version>3.0.5.RELEASE</org.springframework-version>
<org.springframework.roo-version>1.0.2.RELEASE</org.springframework.roo-version>
<org.aspectj-version>1.6.9</org.aspectj-version>
<org.slf4j-version>1.5.10</org.slf4j-version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
<dependency>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j-agent</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.12</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework-version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.2.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.3.1.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>3.3.0.ga</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<!-- Roo dependencies -->
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.annotations</artifactId>
<version>${org.springframework.roo-version}</version>
<scope>provided</scope>
</dependency>
<!-- AspectJ -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${org.aspectj-version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
<scope>runtime</scope>
</dependency>
<!-- @Inject -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>org.smslib</groupId>
<artifactId>smslib</artifactId>
<version>dev-SNAPSHOT</version>
</dependency>
-->
</dependencies>
<repositories>
<!-- For testing against latest Spring snapshots -->
<repository>
<id>org.springframework.maven.snapshot</id>
<name>Spring Maven Snapshot Repository</name>
<url>http://maven.springframework.org/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<!-- For developing against latest Spring milestones -->
<repository>
<id>org.springframework.maven.milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!--
<repository>
<id>smslib-snapshots</id>
<name>SMSLib Repository</name>
<url>http://smslib.org/maven2/snapshots/</url>
</repository>
-->
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>DevTools</warName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>install</id>
<phase>install</phase>
<goals>
<goal>sources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<!-- Have to use version 1.2 since version 1.3 does not appear to work
with ITDs -->
<version>1.2</version>
<dependencies>
<!-- You must use Maven 2.0.9 or above or these are ignored (see MNG-2972) -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${org.aspectj-version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${org.aspectj-version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<outxml>true</outxml>
<source>${java-version}</source>
<target>${java-version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<junitArtifactName>junit:junit</junitArtifactName>
<excludes>
<exclude>**/*_Roo_*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-beta-1</version>
</plugin>
</plugins>
</build>
<name>DevTools</name>
</project>
\ No newline at end of file
package org.emercit.app;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.*;
import javax.servlet.ServletContext;
import java.io.*;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
public class HomeController {
@RequestMapping("/")
public String home() {
return "home";
}
}
package org.emercit.app;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.*;
import javax.servlet.ServletContext;
import java.io.*;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RequestBody;
/**
* Handles requests for the application home page.
*/
@Controller
@RequestMapping("api")
public class MainConfigController {
/*
@RequestMapping(value = "mainconfig/get", method = RequestMethod.GET)
public @ResponseBody MainConfig get() {
try {
//return MainConfigService.get();
}
catch(Exception e)
{
return null;
}
}
*/
/*
@RequestMapping(value="mainconfig/update" , method = RequestMethod.POST)
public @ResponseBody boolean update(@RequestBody MainConfig mainconfig) {
try {
//MainConfigService.Update(mainconfig);
return true;
}
catch(Exception e) {
return false;
}
}
*/
}
package org.emercit.app;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.*;
import javax.servlet.ServletContext;
import java.io.*;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.Vector;
import org.emercit.service.NetService;
import org.emercit.model.NetBean;
import org.emercit.model.DnsBean;
import org.emercit.model.EthBean;
import org.emercit.model.ProxyBean;
@Controller
@RequestMapping("api")
public class NetworkController {
/*
*
*/
@RequestMapping(value = "net/alleth", method = RequestMethod.GET)
public @ResponseBody Vector<EthBean> getAllEth() {
try {
return NetService.INSTANCE.getAllEth();
}
catch(Exception e)
{
return null;
}
}
@RequestMapping(value = "net/dns", method = RequestMethod.GET)
public @ResponseBody Vector<DnsBean> getAllDns() {
try {
return NetService.INSTANCE.getDns();
}
catch(Exception e)
{
return null;
}
}
@RequestMapping(value = "net/proxy", method = RequestMethod.GET)
public @ResponseBody Vector<ProxyBean> getAllProxy() {
try {
return NetService.INSTANCE.getProxy();
}
catch(Exception e)
{
return null;
}
}
/*
export http_proxy='http://user:password@prox-server:3128'
export https_proxy='http://user:password@prox-server:3128'
export ftp_proxy='http://user:password@prox-server:3128'
*/
/*
*
*/
@RequestMapping(value = "net/byeth/{eth}", method = RequestMethod.GET)
public @ResponseBody NetBean getEth(@PathVariable String eth) {
try {
return NetService.INSTANCE.get(eth);
}
catch(Exception e) {
}
return null;
}
}
/*
@RequestMapping(value="mainconfig/update" , method = RequestMethod.POST)
public @ResponseBody boolean update(@RequestBody MainConfig mainconfig) {
try {
//MainConfigService.Update(mainconfig);
return true;
}
catch(Exception e) {
return false;
}
}
*/
package org.emercit.app;
public class UtilController {
}
package org.emercit.model;
import java.io.Serializable;
import java.util.Vector;
public class DnsBean implements Serializable {
private int id;
private String dns;
public DnsBean() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id=id;
}
public String getDns() {
return dns;
}
public void setDns(String value) {
this.dns=value;
}
}
package org.emercit.model;
import java.io.Serializable;
import java.util.Vector;
public class EthBean implements Serializable {
private int id;
private String eth;
public EthBean() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id=id;
}
public String getEth() {
return eth;
}
public void setEth(String value) {
this.eth=value;
}
}
package org.emercit.model;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class IPAddressValidator {
private Pattern pattern;
private Matcher matcher;
private static final String IPADDRESS_PATTERN =
"^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])$";
public IPAddressValidator(){
pattern = Pattern.compile(IPADDRESS_PATTERN);
}
/**
* Validate ip address with regular expression
* @param ip ip address for validation
* @return true valid ip address, false invalid ip address
*/
public boolean validate(final String ip){
matcher = pattern.matcher(ip);
return matcher.matches();
}
}
package org.emercit.model;
import java.io.Serializable;
import java.util.Vector;
public class NetBean implements Serializable {
private static final long serialVersionUID = 1L;
private String ethname;
private String mac;
private boolean dhcp;
private String ip;
private String netmask;
private String gateway;
private String broadcast;
private Vector<String> extinfo;
public NetBean() {
}
public String getEthName() {
return ethname;
}
public void setEthName(String value) {
ethname=value;
}
public String getMac() {
return mac;
}
public void setMac(String value) {
this.mac=value;
}
public boolean getUseDhcp() {
return dhcp;
}
public void setUseDhcp(boolean value) {
this.dhcp = value;
}
public String getIp() {
return ip;
}
public void setIp(String value) {
this.ip = value;
}
public String getNetmask() {
return netmask;
}
public void setNetmask(String value) {
this.netmask=value;
}
public String getGateway() {
return gateway;
}
public void setGateway(String value) {
this.gateway=value;
}
public String getBroadcast() {
return broadcast;
}
public void setBroadcast(String value) {
this.broadcast=value;
}
public Vector<String> getExtInfo() {
return extinfo;
}
public void setExtInfo(Vector<String> value) {
this.extinfo=value;
}
}
package org.emercit.model;
import java.io.Serializable;
import java.util.Vector;
public class ProxyBean implements Serializable {
private int id;
private String proxy;
public ProxyBean() {
}
public int getId() {
return id;
}
public void setId(int id) {
this.id=id;
}
public String getProxy() {
return proxy;
}
public void setProxy(String value) {
this.proxy=value;
}
}
package org.emercit.model;
public class StrCmd {
}
package org.emercit.service;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.List;
import java.util.ArrayList;
import java.util.Random;
import java.util.Vector;
public class CommandExecutor {
public Vector<String> Run(String cmd) throws Exception {
Vector<String> v=new Vector<String>();
Runtime run = Runtime.getRuntime();
Process proc = run.exec(new String[]{"/bin/sh", "-c",cmd});
proc.waitFor();
BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
while(br.ready()) {
v.add(br.readLine());
}
return v;
}
}
package org.emercit.service;
import org.emercit.model.NetBean;
import org.emercit.model.EthBean;
import org.emercit.model.DnsBean;
import org.emercit.model.ProxyBean;
import org.emercit.model.IPAddressValidator;
import java.util.Vector;
public enum NetService {
INSTANCE;
private IPAddressValidator ipvalidator=new IPAddressValidator();
private CommandExecutor ce=new CommandExecutor();
private NetBean nb=new NetBean();
private final String urlZabixAgent="zabbix_get -s 127.0.0.1 -p 10050 -k";
public NetBean get(String eth) throws Exception {
nb.setEthName(eth);
String strUseDhcp=ce.Run(urlZabixAgent+" 'custom.utils.net.eth.usedhcp['"+eth+"'"+"]'").get(1);
if (!strUseDhcp.equals("dhcp")) {
nb.setUseDhcp(false);
// Получение шлюза из файла /etc/networ/interfaces
nb.setGateway(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.gwstatic[]'").firstElement());
nb.setMac(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.mac["+eth+"]'").firstElement());
nb.setIp(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.addrstatic[]'").firstElement());
nb.setBroadcast(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.bcaststatic[]'").firstElement());
nb.setNetmask(ce.Run(urlZabixAgent+ " 'custom.utils.net.eth.netmaskstatic[]'").firstElement());
}else {
nb.setUseDhcp(true);
// Получение шлюза по умолчанию
nb.setGateway(ce.Run(urlZabixAgent+" 'custom.utils.net.gwdefault[]'").firstElement());
nb.setMac(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.mac["+eth+"]'").firstElement());
nb.setIp(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.inetaddr["+eth+"]'").firstElement());
nb.setBroadcast(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.bcast["+eth+"]'").firstElement());
nb.setNetmask(ce.Run(urlZabixAgent+ " 'custom.utils.net.eth.mask["+eth+"]'").firstElement());
}
// ExtInfo
Vector<String> buff=ce.Run(urlZabixAgent+ " 'custom.utils.net.extinfo["+eth+"]'");
buff.remove(0);
buff.remove(0);
for (int i=0;i<buff.size();i++) {
String v=buff.get(i).trim();
buff.remove(i);
buff.insertElementAt(v, i);
}
nb.setExtInfo(buff);
return nb;
}
public Vector<String> set(NetBean m) throws Exception{
Vector<String> result=new Vector<String>();
if (!ipvalidator.validate(m.getIp())) {
new Exception(m.getIp()+"- неверный формат");
}
if (!ipvalidator.validate(m.getNetmask())) {
new Exception(m.getNetmask()+"- неверный формат");
}
if (!ipvalidator.validate(m.getGateway())) {
new Exception(m.getGateway()+"- неверный формат");
}
if (m.getUseDhcp()) {
ce.Run("");
}else {
ce.Run("");
}
this.nb=m;
return result;
}
public Vector<EthBean> getAllEth() throws Exception {
Vector<EthBean> result=new Vector<EthBean>();
Vector<String> v=ce.Run("zabbix_get -s 127.0.0.1 -p 10050 -k 'custom.utils.net.eths[]'");
int i=0;
for (String s:v) {
EthBean eb=new EthBean();
eb.setId(i);
eb.setEth(s);
result.add(eb);
i++;
}
return result;
}
public Vector<DnsBean> getDns() throws Exception {
Vector<DnsBean> result=new Vector<DnsBean>();
Vector<String> v=ce.Run("zabbix_get -s 127.0.0.1 -p 10050 -k 'custom.utils.net.dns[]'");
int i=0;
for (String s:v) {
DnsBean db=new DnsBean();
db.setId(i);
db.setDns(s);
result.add(db);
i++;
}
return result;
}
public Vector<ProxyBean> getProxy() throws Exception {
Vector<ProxyBean> result=new Vector<ProxyBean>();
Vector<String> v=ce.Run("zabbix_get -s 127.0.0.1 -p 10050 -k 'custom.utils.net.globalproxy[]'");
int i=0;
for (String s:v) {
ProxyBean db=new ProxyBean();
db.setId(i);
db.setProxy(s);
result.add(db);
i++;
}
return result;
}
}
package org.emercit.service;
public class UtilService {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- Appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p: %c - %m%n" />
</layout>
</appender>
<!-- Application Loggers -->
<logger name="org.emercit.app">
<level value="info" />
</logger>
<!-- 3rdparty Loggers -->
<logger name="org.springframework.core">
<level value="info" />
</logger>
<logger name="org.springframework.beans">
<level value="info" />
</logger>
<logger name="org.springframework.context">
<level value="info" />
</logger>
<logger name="org.springframework.web">
<level value="info" />
</logger>
<!-- Root Logger -->
<root>
<priority value="warn" />
<appender-ref ref="console" />
</root>
</log4j:configuration>
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
<!-- Enables the Spring MVC @Controller programming model -->
<annotation-driven />
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />
<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="org.emercit.app" />
<!-- Transporting JSON - Data -->
<beans:bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<beans:property name="mediaTypes">
<beans:map>
<beans:entry key="json" value="application/json"/>
</beans:map>
</beans:property>
<beans:property name="defaultViews">
<beans:list>
<beans:bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
<beans:property name="prefixJson" value="true"/>
</beans:bean>
</beans:list>
</beans:property>
</beans:bean>
</beans:beans>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
</beans>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Device Tools</title>
<script type="text/javascript" src="resources/js/extjs5.0.0/build/ext-all-debug.js"></script>
<script type="text/javascript" src="resources/js/extjs5.0.0/packages/ext-theme-crisp/build/ext-theme-crisp.js"></script>
<link rel="stylesheet" href="resources/js/extjs5.0.0/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all-debug.css" />
<script type="text/javascript" src="resources/js/app.js"></script>
<script src="resources/js/jquery.min.js"></script>
</head>
<body>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Processes application requests -->
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
Ext.application({
name : 'App',
appFolder:"resources/js/app",
views : [
'MainConfig',
'NetworkSetting',
'PingUtil',
'Eth',
'Dns',
'Proxy',
'DetailDns',
'DetailProxy'
],
controllers : [
'NetworkSetting',
'MainConfig',
'PingUtil'
],
stores : [
'Eth',
'Dns',
'Proxy'
],
launch : function() {
var record = new Object({
run: function () {
var ret = null;
$.ajax({
url: 'api/mainconfig/get',
beforeSend: function () {
},
async: false,
dataType: "json",
type: "GET",
success: function (data) {
ret=data;
}
});
return ret;
}
});
var data=record.run();
Ext.create('Ext.container.Viewport', {
layout: {
type: 'border'
},
defaults: {
split: true
},
items: [{
region: 'north',
height: 30,
id: 'mainHeader',
margins: '0 5 5 5',
bodyPadding: 5,
items:[{
html:'<h2>Параметры</h2>'
}]
},
{
region: 'south',
html: "",
height: 30,
margins: '0 5 5 5',
bodyPadding: 2,
id: 'mainFooter'
},
{
id: 'mainContent',
collapsible: false,
region: 'center',
//layout: 'fit',
border: true,
items:[
{
region: 'center',
xtype: 'tabpanel',
items: [
{
title: 'УСТРОЙСТВО',
items:[
{
region: 'center',
xtype: 'tabpanel',
items: [ {
title: 'Описание',
items:[{
xtype : 'mvvm-MainConfigView',
viewModel : {
data : {
rec : {
title:"",
guid:""
}
}
}
}]
},
{
title: 'Дата/время',
items:[]
}
]
}
]
},
{
title: 'СЕТЬ',
items:[{
region: 'center',
xtype: 'tabpanel',
items: [
{
title: 'Eth - интерфейсы',
items:[{
xtype : 'mvvm-EthView',
id:'cbxeth'
},
{
xtype : 'mvvm-NetworkSettingView',
id:'fromnetwork',
viewModel : {
data:{
broadcast: "",
ethName: "",
gateway: "",
ip: "",
mac: "",
netmask: "",
useDhcp: 0,
extInfo:[""]
}
}
}
]
},
{
title: 'Dns',
items:[
{
xtype : 'mvvm-DnsView',
id:'grdDns'
}
]
},
{
title: 'Proxy',
items:[{
xtype : 'mvvm-ProxyView',
id:'grdProxy'
}]
}]
}
]
},
{
title: 'УТИЛИТЫ',
items:[{
xtype : 'mvvm-PingUtilView',
viewModel : {
data : {
rec : {
host:"",
result:"",
}
}
}
}
]
},
{
title: 'ПЕРЕМЕННЫЕ',
items:[
{
region: 'center',
xtype: 'tabpanel',
items: [
{
title: 'Аналоговые',
items:[]
},
{
title: 'Дискретные',
items:[]
},
{
title: 'Параметры устройства',
items:[]
}
]
}
]
},
{
title: 'СЕРВИСЫ',
items:[
{
region: 'center',
xtype: 'tabpanel',
items: [
{
title: 'SNMP Агент',
items:[
]
},
{
title: 'SNMP Клиент',
items:[
]
}
]
}
]
},
{
title: 'ФАЙЛОВЫЙ МЕНЕДЖЕР',
items:[
]
},
{
title: 'ЛОГИ',
items:[{
region: 'center',
xtype: 'tabpanel',
items: [
{
title: 'Web Tools',
items:[
]
},
{
title: 'SNMP Агент',
items:[
]
},
{
title: 'SNMP Клиент',
items:[
]
},
{
title: 'NTP',
items:[
]
}
]
}]
}
]
}
]
}]
});
}
});
Ext.define('App.controller.MainConfig', {
extend : 'Ext.app.Controller',
init : function() {
this.control({
'mvvm-MainConfigView > button#SaveRecord' : {
click : this.onSaveButtonClick
}
});
},
onSaveButtonClick : function(btn) {
//get reference to the form
var mainconfigView = btn.up('mvvm-MainConfigView');
//get the bound record
var record = mainconfigView.getViewModel().getData().rec;
if (record) {
var data=Ext.util.JSON.encode(record);
Ext.Ajax.request({
method: "POST",
url: 'api/mainconfig/update',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
params: data,
success: function(response, opts) {
var result = Ext.JSON.decode(response.responseText);
if(result) {
Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
//record.commit();
}
else
{
Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
}, failure: function(response, opts) {
Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
});
}
else {
Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
}
});
Ext.define('App.controller.NetworkSetting', {
extend : 'Ext.app.Controller',
init : function() {
this.control({
'mvvm-NetworkSettingView > button#SaveRecord' : {
click : this.onSaveButtonClick
}
});
Ext.TaskManager.start({
run: this.ReloadData,
interval: 10000 ,
scope: this
});
},
ReloadData: function() {
var combo=Ext.getCmp('cbxeth');
if (typeof combo.getStore().lastOptions !== "undefined") {
var value = combo.getValue();
var valueField = combo.valueField;
var record;
combo.getStore().each(function(r){
if(r.data[valueField] == value){
record = r;
return false;
}
});
var eth=record ? record.get(combo.displayField) : null;
Ext.Ajax.request({
method: "GET",
url: 'api/net/byeth/'+eth,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
success: function(response, opts) {
var result = Ext.JSON.decode(response.responseText);
console.log(result);
//var detailFireSystemView = btn.up('mvvm-DetailFireSystemView');
//var record = detailFireSystemView.getViewModel().getData().rec;
Ext.getCmp('fromnetwork').viewModel.setData(result);
//Ext.getCmp('fromnetwork').viewModel.bind(result);
console.log(Ext.getCmp('fromnetwork').getViewModel().getData());
Ext.getCmp('ttt').setValue(result.extInfo);
var checkbox = Ext.getCmp('dhcp');
console.log("result.useDhcp:"+result.useDhcp);
if (result.useDhcp) {
checkbox.checked = true;
checkbox.addCls('x-form-cb-checked x-form-dirty');
Ext.getCmp('ip').setDisabled(true);
Ext.getCmp('netmask').setDisabled(true);
Ext.getCmp('gateway').setDisabled(true);
Ext.getCmp('broadcast').setDisabled(true);
}else {
checkbox.checked = false;
checkbox.removeCls('x-form-cb-checked x-form-dirty');
Ext.getCmp('ip').setDisabled(false);
Ext.getCmp('netmask').setDisabled(false);
Ext.getCmp('gateway').setDisabled(false);
Ext.getCmp('broadcast').setDisabled(false);
}
checkbox.checkChange();
Ext.getCmp('mac').setValue(result.mac);
Ext.getCmp('ip').setValue(result.ip);
Ext.getCmp('netmask').setValue(result.netmask);
Ext.getCmp('gateway').setValue(result.gateway);
Ext.getCmp('broadcast').setValue(result.broadcast);
Ext.getCmp('mac').setDisabled(true);
// me.viewModel.setData(record);
//if(result) {
// Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
//record.commit();
//}
//else
//{
// Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
//}
}, failure: function(response, opts) {
// Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
});
}
},
onSaveButtonClick : function(btn) {
//get reference to the form
var networksettingView = btn.up('mvvm-NetworkSettingView');
//get the bound record
var record = networksettingView.getViewModel().getData().rec;
if (record) {
var data=Ext.util.JSON.encode(record);
Ext.Ajax.request({
method: "POST",
url: 'api/mainconfig/update',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
params: data,
success: function(response, opts) {
var result = Ext.JSON.decode(response.responseText);
if(result) {
Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
//record.commit();
}
else
{
Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
}, failure: function(response, opts) {
Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
});
}
else {
Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
}
});
Ext.define('App.controller.PingUtil', {
extend : 'Ext.app.Controller',
init : function() {
this.control({
'mvvm-PingUtilView > button#SaveRecord' : {
click : this.onSaveButtonClick
}
});
},
onSaveButtonClick : function(btn) {
//get reference to the form
var pingutilView = btn.up('mvvm-PingUtilView');
//get the bound record
var record = pingutilView.getViewModel().getData().rec;
if (record) {
var data=Ext.util.JSON.encode(record);
Ext.Ajax.request({
method: "POST",
url: 'api/mainconfig/update',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
params: data,
success: function(response, opts) {
var result = Ext.JSON.decode(response.responseText);
if(result) {
Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
//record.commit();
}
else
{
Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
}, failure: function(response, opts) {
Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
});
}
else {
Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
}
});
\ No newline at end of file
Ext.define('App.model.Dns', {
extend : 'Ext.data.Model',
fields : [{
name:'id',
type:'int'
},
{
name:'dns',
type:'string'
}]
});
Ext.define('App.model.Eth', {
extend : 'Ext.data.Model',
fields : [
{
name : 'id',
type : 'int'
},
{
name : 'eth',
type : 'string'
}
]
});
\ No newline at end of file
Ext.define('App.model.MainConfig', {
extend : 'Ext.data.Model',
fields : [
{
name : 'title',
type : 'string'
},
{
name : 'guid',
type : 'string'
}
],
autoLoad: true,
autoSync: true,
// alias: 'store.devices',
proxy : {
type : 'ajax',
api: {
read: 'api/mainconfig/get'
},
reader : {
type : 'json'
}
}
});
\ No newline at end of file
Ext.define('App.model.NetworkSetting', {
extend : 'Ext.data.Model',
fields : [
{
name : 'mac',
type : 'string'
},
{
name : 'ethName',
type : 'string'
},
{
name : 'useDhcp',
type : 'boolean'
},
{
name : 'ip',
type : 'string'
},
{
name : 'gateway',
type : 'string'
},
{
name : 'netmask',
type : 'string'
},
{
name : 'broadcast',
type : 'string'
},
{
name : 'extInfo'
// type:'auto'
}
],
autoLoad: true,
autoSync: true,
// alias: 'store.devices',
proxy : {
type : 'ajax',
api: {
read: 'api/mainconfig/get'
},
reader : {
type : 'json'
}
}
});
\ No newline at end of file
Ext.define('App.model.PingUtil', {
extend : 'Ext.data.Model',
fields : [
{
name : 'host',
type : 'string'
},
{
name : 'result',
type : 'string'
}
],
autoLoad: true,
autoSync: true,
// alias: 'store.devices',
proxy : {
type : 'ajax',
api: {
read: 'api/mainconfig/get'
},
reader : {
type : 'json'
}
}
});
\ No newline at end of file
Ext.define('App.model.Proxy', {
extend : 'Ext.data.Model',
fields : [{
name:'id',
type:'int'
},
{
name:'proxy',
type:'string'
}]
});
\ No newline at end of file
Ext.define('App.store.Dns', {
extend : 'Ext.data.Store',
requires : [
'App.model.Dns'
],
storeId : 'Dns',
model : 'App.model.Dns',
autoLoad: true,
autoSync: true,
alias: 'store.devices',
proxy : {
type : 'ajax',
api: {
read: 'api/net/dns'
},
reader : {
type : 'json',
idProperty : 'id'
}
}
});
\ No newline at end of file
Ext.define('App.store.Eth', {
extend : 'Ext.data.Store',
requires : [
'App.model.Eth'
],
storeId : 'Eth',
model : 'App.model.Eth',
autoLoad: true,
autoSync: true,
// alias: 'store.devices',
proxy : {
type : 'ajax',
api: {
read: 'api/net/alleth'
},
reader : {
type : 'json',
idProperty : 'id'
}
}
});
\ No newline at end of file
Ext.define('App.store.Proxy', {
extend : 'Ext.data.Store',
requires : [
'App.model.Proxy'
],
storeId : 'Proxy',
model : 'App.model.Proxy',
autoLoad: true,
autoSync: true,
alias: 'store.devices',
proxy : {
type : 'ajax',
api: {
read: 'api/net/proxy'
},
reader : {
type : 'json',
idProperty : 'id'
}
}
});
\ No newline at end of file
Ext.define('App.view.DetailDns', {
extend : 'Ext.form.Panel',
xtype : 'mvvm-DetailDnsView',
requires : [
'App.view.DetailDnsViewModel',
],
height:115,
width:250,
frame : true,
padding : 10,
viewModel: {
type: 'detaildnsform'
},
items :[{
xtype:'fieldcontainer',
items:[{
xtype:'textfield',
bind:'{rec.dns}',
disable:true
}]
},
{
xtype : 'button',
text : 'Ок',
itemId : 'SaveRecord'
}]
});
\ No newline at end of file
Ext.define('App.view.DetailDnsViewModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.detaildnsform',
data : {
rec : null
}
});
\ No newline at end of file
Ext.define('App.view.DetailProxy', {
extend : 'Ext.form.Panel',
xtype : 'mvvm-DetailProxyView',
requires : [
'App.view.DetailProxyViewModel',
],
height:130,
width:400,
frame : true,
padding : 10,
viewModel: {
type: 'detailproxyform'
},
items :[{
xtype:'fieldcontainer',
items:[{
xtype:'textfield',
bind:'{rec.proxy}',
disable:true,
width:350,
}]
},
{
xtype : 'button',
text : 'Ок',
itemId : 'SaveRecord',
margin : '20 20 20 20'
}]
});
\ No newline at end of file
Ext.define('App.view.DetailProxyViewModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.detailproxyform',
data : {
rec : null
}
});
\ No newline at end of file
Ext.define('App.view.Dns', {
extend : 'Ext.grid.Panel',
xtype : 'mvvm-DnsView',
title : 'DNS сервера',
store : 'Dns',
tbar: [
{
text:'Добавить',
handler: function(){
if (winadddns==null) {
var winadddns = Ext.create('widget.window', { // создание окна
title:'Добавить',
maximize: function(){
this.callParent([true]); //animate
},
restore: function(){
this.callParent([true]); //animate
},
closeAction: 'hide',
items: [
{
xtype : 'mvvm-DetailDnsView',
viewModel : {
data : {
rec : {
dns:'127.0.0.1'
}
}
}
}
]
});
winadddns.show();
}
}
}] ,
columns: [{
text : '№',
dataIndex : 'id',
flex: 1
},
{
text : 'HOST',
dataIndex : 'dns',
flex : 5
},
{
xtype: 'actioncolumn',
text : '#',
flex:1,
dataIndex: 'guid',
items: [{
icon: 'resources/img/tools.png',
handler: function (grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
if (wintoolsdns==null) {
var wintoolsdns = Ext.create('widget.window', { // создание окна
title:'Изменить',
maximize: function(){
this.callParent([true]); //animate
},
restore: function(){
this.callParent([true]); //animate
},
closeAction: 'hide',
items: [
{
xtype : 'mvvm-DetailDnsView',
viewModel : {
data : {
rec : rec
}
}
}
]
});
wintoolsdns.show();
}
}
}
],
action: 'tools'
},
]
});
\ No newline at end of file
Ext.define('App.view.Eth', {
extend : 'Ext.form.field.ComboBox',
xtype : 'mvvm-EthView',
store : 'Eth',
fieldLabel: 'Eth',
valueField:'id',
displayField:'eth',
queryMode:'local',
margin:'5 5 5 5',
action:'cbxeth' ,
listeners:{
scope: this,
select: function(combo, records, eOpts) {
// console.log(records[0].get('eth'));
Ext.Ajax.request({
method: "GET",
url: 'api/net/byeth/'+records[0].get('eth'),
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
success: function(response, opts) {
var result = Ext.JSON.decode(response.responseText);
console.log(result);
//var detailFireSystemView = btn.up('mvvm-DetailFireSystemView');
//var record = detailFireSystemView.getViewModel().getData().rec;
Ext.getCmp('fromnetwork').viewModel.setData(result);
//Ext.getCmp('fromnetwork').viewModel.bind(result);
console.log(Ext.getCmp('fromnetwork').getViewModel().getData());
Ext.getCmp('ttt').setValue(result.extInfo);
var checkbox = Ext.getCmp('dhcp');
console.log("result.useDhcp:"+result.useDhcp);
if (result.useDhcp) {
checkbox.checked = true;
checkbox.addCls('x-form-cb-checked x-form-dirty');
Ext.getCmp('ip').setDisabled(true);
Ext.getCmp('netmask').setDisabled(true);
Ext.getCmp('gateway').setDisabled(true);
Ext.getCmp('broadcast').setDisabled(true);
}else {
checkbox.checked = false;
checkbox.removeCls('x-form-cb-checked x-form-dirty');
Ext.getCmp('ip').setDisabled(false);
Ext.getCmp('netmask').setDisabled(false);
Ext.getCmp('gateway').setDisabled(false);
Ext.getCmp('broadcast').setDisabled(false);
}
checkbox.checkChange();
Ext.getCmp('mac').setValue(result.mac);
Ext.getCmp('ip').setValue(result.ip);
Ext.getCmp('netmask').setValue(result.netmask);
Ext.getCmp('gateway').setValue(result.gateway);
Ext.getCmp('broadcast').setValue(result.broadcast);
Ext.getCmp('mac').setDisabled(true);
// me.viewModel.setData(record);
//if(result) {
// Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
//record.commit();
//}
//else
//{
// Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
//}
}, failure: function(response, opts) {
// Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
});
},
/*
afterRender: function(combo) {
if (typeof combo.getStore().lastOptions !== "undefined") {
combo.setValue(combo.getStore().first().get(combo.valueField));
var value = combo.getValue();
var valueField = combo.valueField;
var record;
combo.getStore().each(function(r){
if(r.data[valueField] == value){
record = r;
return false;
}
});
var eth=record ? record.get(combo.displayField) : null;
Ext.Ajax.request({
method: "GET",
url: 'api/net/byeth/'+eth,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
success: function(response, opts) {
var result = Ext.JSON.decode(response.responseText);
console.log(result);
//var detailFireSystemView = btn.up('mvvm-DetailFireSystemView');
//var record = detailFireSystemView.getViewModel().getData().rec;
Ext.getCmp('fromnetwork').viewModel.setData(result);
//Ext.getCmp('fromnetwork').viewModel.bind(result);
console.log(Ext.getCmp('fromnetwork').getViewModel().getData());
Ext.getCmp('ttt').setValue(result.extInfo);
// me.viewModel.setData(record);
//if(result) {
// Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
//record.commit();
//}
//else
//{
// Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
//}
}, failure: function(response, opts) {
// Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
}
});
}
else {
combo.getStore().on("load", function(store, items){
combo.setValue(items[0].get(combo.valueField));
var value = combo.getValue();
console.log(value);
});
}
}*/
},
});
Ext.define('App.view.MainConfig', {
extend : 'Ext.form.Panel',
xtype : 'mvvm-MainConfigView',
requires : [
'App.view.MainConfigViewModel'
],
frame : true,
padding : 10,
bind : {
// reference : 'App.model.MainConfig',
// title : '{rec.title}'
},
viewModel: {
type: 'mainconfigform' // references DetailViewModel
},
items : [
{
xtype : 'textfield',
bind : '{rec.guid}',
fieldLabel : 'GUID',
disable:true,
width:500,
margin:'5 5 10 3'
},
{
xtype : 'textarea',
bind : '{rec.title}',
fieldLabel : 'ОПИСАНИЕ',
height:50,
width:500,
margin:'5 5 10 3'
},
{
xtype : 'button',
text : 'Сохранить',
itemId : 'SaveRecord'
}
]
});
\ No newline at end of file
Ext.define('App.view.MainConfigViewModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.mainconfigform',
data : {
rec : null
}
});
\ No newline at end of file
Ext.define('App.view.NetworkSetting', {
extend : 'Ext.form.Panel',
xtype : 'mvvm-NetworkSettingView',
requires : [
'App.view.NetworkSettingViewModel'
],
frame : false,
padding : 3,
items : [
{
xtype : 'checkboxfield',
fieldLabel : 'DHCP',
id:'dhcp',
inputValue: '1',
uncheckedValue: '0',
margin:'5 5 10 3'
},
{
xtype : 'textfield',
bind : '{mac}',
id:'mac',
fieldLabel : 'MAC',
margin:'5 5 10 3'
},
{
xtype : 'textfield',
bind : '{ip}',
fieldLabel : 'IP',
id:'ip',
margin:'5 5 10 3'
},
{
xtype : 'textfield',
bind : '{gateway}',
fieldLabel : 'GATEWAY',
id:'gateway',
margin:'5 5 10 3'
},
{
xtype : 'textfield',
bind : '{netmask}',
fieldLabel : 'NETMASK',
id:'netmask',
margin:'5 5 10 3'
},
{
xtype : 'textfield',
bind : '{broadcast}',
fieldLabel : 'BROADCAST',
id:'broadcast',
margin:'5 5 10 3',
},
{
xtype : 'textarea',
// bind : '{extInfo}',
id:'ttt',
fieldLabel : 'СТАТУС',
margin:'5 5 10 3',
allowBlank : false,
width:700,
height:100,
},
{
xtype : 'button',
text : 'ПРИМЕНИТЬ',
itemId : 'SaveRecord',
margin:'5 5 10 3'
}
]
});
\ No newline at end of file
Ext.define('App.view.NetworkSettingViewModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.networksettingform',
data : {
}
});
\ No newline at end of file
Ext.define('App.view.PingUtil', {
extend : 'Ext.form.Panel',
xtype : 'mvvm-PingUtilView',
requires : [
'App.view.PingUtilViewModel'
],
frame : true,
padding : 10,
bind : {
// reference : 'App.model.MainConfig',
// title : '{rec.title}'
},
viewModel: {
type: 'pingutilform' // references DetailViewModel
},
items : [
{
xtype : 'textfield',
bind : '{rec.host}',
fieldLabel : 'HOST',
disable:true,
margin:'5 5 10 3'
},
{
xtype : 'button',
text : 'PING',
itemId : 'SaveRecord'
},
{
bind : '{rec.result}',
fieldLabel : 'РЕЗУЛЬТАТ',
margin:'5 5 10 3',
xtype : 'textareafield',
grow : true,
preventScrollbars: false,
width:700,
height:200
},
]
});
\ No newline at end of file
Ext.define('App.view.PingUtilViewModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.pingutilform',
data : {
rec : null
}
});
\ No newline at end of file
Ext.define('App.view.Proxy', {
extend : 'Ext.grid.Panel',
xtype : 'mvvm-ProxyView',
title : 'Proxy сервера',
store : 'Proxy',
tbar: [
{
text:'Добавить',
handler: function(){
if (winaddproxy==null) {
var winaddproxy = Ext.create('widget.window', { // создание окна
title:'Добавить',
maximize: function(){
this.callParent([true]); //animate
},
restore: function(){
this.callParent([true]); //animate
},
closeAction: 'hide',
items: [
{
xtype : 'mvvm-DetailProxyView',
viewModel : {
data : {
rec : {
proxy:"http_proxy='http://user:password@proxyserver:7777'"
}
}
}
}
]
});
winaddproxy.show();
}
}
}] ,
columns: [{
text : '№',
dataIndex : 'id',
flex: 1
},
{
text : 'Proxy сервер',
dataIndex : 'proxy',
flex : 5
},
{
xtype: 'actioncolumn',
text : '#',
flex:1,
dataIndex: 'guid',
items: [{
icon: 'resources/img/tools.png',
handler: function (grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
if (wintoolsproxy==null) {
var wintoolsproxy = Ext.create('widget.window', { // создание окна
title:'Изменить',
maximize: function(){
this.callParent([true]); //animate
},
restore: function(){
this.callParent([true]); //animate
},
closeAction: 'hide',
items: [
{
xtype : 'mvvm-DetailProxyView',
viewModel : {
data : {
rec : rec
}
}
}
]
});
wintoolsproxy.show();
}
}
}
],
action: 'tools'
},
]
});
\ No newline at end of file
This diff could not be displayed because it is too large.
# =============================================================================
# This file provides an override point for default variables defined in
# defaults.properties.
#
# IMPORTANT - Sencha Cmd will merge your changes with its own during upgrades.
# To avoid potential merge conflicts avoid making large, sweeping changes to
# this file.
# =============================================================================
{
"sources": {
"package.json.tpl.merge": {
"12322b2f0769f491000df8ec0e012dd2d78a7eaf": "eJx1zrEKwjAQgOG9TxE6S9HV2VFcFBdxONJrDW1y8XIRSum7m2pTJzMd/3cHGQuVXunAYrlX5ei79pTmqdx8QQa/wiXNK2hGEOLZwJEbLMWQLURrgYfZzg9iUTksXqOA6bE+YNBsvBhy8+6RXKvqX1PUKA+6gxbz5Qs5LNu7altt19+Q9SDXP9oQW5BPzqknDX0qwhGXxPiMhjGkersXU/EGNatRVA\u003d\u003d"
},
"config.rb.tpl.merge": {
"33f446bd02c3fd24eb27891582eff6a2e789796b": "eJxLLi2KT8ksUrBVcMvMSdUDMvMSc1M14uPdPH1c4+M1ufJLSwpKS+KLSypzUoGqrPJSi0tSU7gALskTcA\u003d\u003d"
},
"all.scss.merge": {
"da39a3ee5e6b4b0d3255bfef95601890afd80709": "eJwDAAAAAAE\u003d"
},
"custom.js.merge": {
"199e99bbd15c3c0415569425cb21e77c95e9042a": "eJxlj0FOxDAMRfdziq9ZwUjTHIAlYslquIAncdtA4lSxC8PtSdoREmIV6f/4+dmdDjjhbY6KMSZGeycWrmQcQAqCGlWLMmEpUQzXb1xY/Ex4zgFnRMNXTAlSWseovCTybbbUDl6XsJHa1FH3sYX8B03cqqlS4OPQ//2V8CQ7K5fPriEBNjPU17gYjCZE6UnmYbacfj/GsaUNslUIhbVzu5lwq/2qVjIohGixCCVkkjiyWrOFzqWaXw0sViPr0IRYGVQ7yq+55X2HdObg7meo45udt4XnKyk7Je0Z5SWxqyyB6/Cu/Uh3ODj3crNhN28ar/f1D49P/7rLXUd7+QPuPI9g"
},
"theme.html.tpl.merge": {
"32f685a8af28baafcc7999862d0bd1f25df0e48b": "eJx1U02P0zAQvedXzPoEFW66CwfUTXopiwAhgbTlwNF1po13HdvY0zYR4r9jOwXSBXxI5HnzPqyxq6s3n9abr5/voKVOr4rqivMCANbWDV7tW4Jn8jncLK5vePy8nMM9GtkKeG/kvOA8Es68FkWzSkyoSJHG1V1P8OEeNi12CO+ENxhCVY7Y2NchiWhLjuO3gzrWbG0NoSG+GRwykOOuZoQ9lcnmFqK1D0j1l81b/pqtilHonBk+WtGA0Bp8EvTYgFbmMYAwDQTplaOQ+1LuTExwbNY1CzRoDC0iMaBof3aVITBoPe5qhr3onMZ5LpVngVF1yngQRzFWGQQva7a1lgJ54eYPga2qcgR/Rc++o1ha85Nq9kg8nV0ogx6+/8bS6oTfK7OE64Xrby+QSKR2Ca8WfyHOBkXKRlY8qSB1xEvcHtHvtD0t4aiC2uoJ/KP4k6znQSuJnlPMgPTivwjMnoS2TkhFQ0z9T+VyBmjCwSNsbTNAYzGAsZRzaeGAWgRvD6aJ85Q23iMfwO5g50UXK04Y1OVJmcae4NSigRRGmT3MymnE3MeTw0XykZjrT1JvhXzcZ98lxPGZ4ISP13F6hDzB8jzCqpw8gaQXZ51/Cclv5CfT2f4m"
},
"build.properties.merge": {
"8b81315dbe73ce9c08478f4c1d2df84f456efcf5": "eJytkEtOxEAMRPdzipKyhbkBCzQrFnzE5AKetJNYdOzI3UnE7XGA3GC8K5f9/GnwdM84NWhHKeglM2a3VRIXkMJWdg+B2UQrenMk7mnJFSu50C1HXWREOUEUAfr3yzk4M3sVLudTE8bL68f7Z/v81uIRV9ZuJFymhE1yxsQ+ML5tcUReh6BuUkdILbBNkRYXHbDMg1P6BaI10GqSYrXKWoUOSmfaZ+mi88+f6GvvzRTmA8rGPO/6mFMtYPW4fiff97U/al6C1w\u003d\u003d"
},
"sencha.cfg.tpl.merge": {
"6d1982cce48163a98dc46012d1d0cdfa209fbda6": "eJzFVdFq2zAUfc9XXNzBWmicvg0GgXZlD9vDWsge96LIcqJFljRJTuqN/vuOJNvJmqbbYLASim1dnXPuuVdXZ/R5LUizRpCpKeDZMr5hK0FT8mvTqooaFvg6LRUxriDrjBUudCQ1lbM+vvzqjZ6cTYbXGDr/YTerT3h4nEzORiKPEEHB0G4tE7D0A+lrT4ubxYK4cQ5xRle+TPsqUbNWBdoy1UalgCveP4SCGsG0BwYLSWEtlfBZl2fez7zjdM50NbxvmbvoE+IKH1IwwOLehOeMCXuVJX3QZLDoaGdc5S8Ta2mZFqq8j/+hgFkIMADZc85SxCxFlJ57X2I5WmDIh06Jkbx2piGmuz3lJXkRsimwaKmY3kBFnb/gl75cZsk6hmTAY12daSE6FtC2IduaUj1QiT3PKR1rGAPLUdkc4bmOWUn0jJumYVMvLHMsiIqU9CE2Um1UJZxHiYXbZ4uaykqkinoBpOF702LXUpB4sEpyGVSH0G+tdECMJggo56qt8IrSRt5lK1V1KDVBWRbW81df2qurN++GhUq6x5js3yrHo9kK5yAYPXij1L63YimAFtloJ7ECgSu5RTkYBbaKW4ue/m6AKPpuBztrg0ELSs6U6oAzpgroldAi62EWbbXs8pGEcULz/ogCQkkdPYlBOHdv4cMZEc1m1z0WXT/lP7BqTOtZq8bVp4ZlY/qKpnYqYGvRFzWd0xzsBXN8jRRq42hxu1gAKHuXjul+nHxkW7bgTtowdkLrsa/PGsmhG2CU0UdNCebTxe7b+w8SwDjw/ykDUL+cAQLGDCL5UeuQbKxxITUOTkkkTFmls4GehHjRp3jELsJv/EPADCRpJJwwEv3XT3BDVsWZXsQuXbM8zeMdkqQUZNqAGXQoIp9f0D2rIK0OV0bPlpznRgcmMfDFA2us+sXhc3+R6nV4nxxS9lv8SdYh4EVi3y6n/S4/HscBhu40yoI7SubWKWqH4YmbY1OkeZEv1tDZX4QBEtfkaV0DHXTN/+kfNN1i8uIGus83ukROU7pPteRpRX5P3mISCWV2B8MHNWdbgzwb4VZplhtdoxQBM19iLmqxg3eYJT5un/wEixPeXA\u003d\u003d"
},
"testing.properties.merge": {
"e65f969c42eb4f355c850fc58fea852582f20db8": "eJyVkUFywyAQBO9+xVb5oIutH/gX+QCCkbUOAooFOf59FsmqpHKKOFEwOzM0Z7r9f53O9DGx0Mge5DBygFDKMSEX1m0VOBpepLqhsndXnpPvv2Z/oefEdiKdLRNoMAJqdyqMI5lAJiXP1hSOQbbZ5msh0mskmuOvnDHHWY32JjbmDEkxOCqxBai6K5DC4d693RAWzjHMCOVCkmB5ZLhW9EWdINjJtBJv9T7cU0vXsk/2rWwxn9AisHA6AooLcgNhqi8riYXdimAn0P+07vXsCOuD8rNimLWaiDKkmBrK7UOUyR0B2RRQdzXedyp+CMVaUi0rQn3ninMxvurPspjBQ/54jjHvYLbHycGKG5Fm2SIf0u/ut9M3l43NIg\u003d\u003d"
}
},
"targets": {
"package.json": {
"source": "package.json.tpl.merge",
"version": "12322b2f0769f491000df8ec0e012dd2d78a7eaf",
"parameters": {
"pkgType": "theme",
"touchRelPath": "../../../touch",
"senchadir": ".sencha",
"pkgName": "ext-theme-crisp-touch",
"extRelPath": "../.."
}
},
"sass/config.rb": {
"source": "config.rb.tpl.merge",
"version": "33f446bd02c3fd24eb27891582eff6a2e789796b",
"parameters": {
"pkgType": "theme",
"touchRelPath": "../../../touch",
"senchadir": ".sencha",
"pkgName": "ext-theme-crisp-touch",
"extRelPath": "../.."
}
},
"sass/etc/all.scss": {
"source": "all.scss.merge",
"version": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
"parameters": {
"pkgType": "theme",
"touchRelPath": "../../../touch",
"senchadir": ".sencha",
"pkgName": "ext-theme-crisp-touch",
"extRelPath": "../.."
}
},
"sass/example/custom.js": {
"source": "custom.js.merge",
"version": "199e99bbd15c3c0415569425cb21e77c95e9042a",
"parameters": {
"pkgType": "theme",
"touchRelPath": "../../../touch",
"senchadir": ".sencha",
"pkgName": "ext-theme-crisp-touch",
"extRelPath": "../.."
}
},
"sass/example/theme.html": {
"source": "theme.html.tpl.merge",
"version": "32f685a8af28baafcc7999862d0bd1f25df0e48b",
"parameters": {
"pkgType": "theme",
"touchRelPath": "../../../touch",
"senchadir": ".sencha",
"pkgName": "ext-theme-crisp-touch",
"extRelPath": "../.."
}
},
".sencha/package/build.properties": {
"source": "build.properties.merge",
"version": "8b81315dbe73ce9c08478f4c1d2df84f456efcf5",
"parameters": {
"pkgType": "theme",
"touchRelPath": "../../../touch",
"senchadir": ".sencha",
"pkgName": "ext-theme-crisp-touch",
"extRelPath": "../.."
}
},
".sencha/package/sencha.cfg": {
"source": "sencha.cfg.tpl.merge",
"version": "6d1982cce48163a98dc46012d1d0cdfa209fbda6",
"parameters": {
"pkgType": "theme",
"touchRelPath": "../../../touch",
"senchadir": ".sencha",
"pkgName": "ext-theme-crisp-touch",
"extRelPath": "../.."
}
},
".sencha/package/testing.properties": {
"source": "testing.properties.merge",
"version": "e65f969c42eb4f355c850fc58fea852582f20db8",
"parameters": {
"pkgType": "theme",
"touchRelPath": "../../../touch",
"senchadir": ".sencha",
"pkgName": "ext-theme-crisp-touch",
"extRelPath": "../.."
}
}
}
}
\ No newline at end of file
# =============================================================================
# This file defines properties used by build-impl.xml and the associated
# *-impl.xml files (sass-impl.xml, js-impl.xml, etc.), which are the core of
# the applications build process.
#
# IMPORTANT - This file is not modifiable by a package, and will be overwritten
# during each app upgrade. Please use build.properties for defining package
# customizations to these properties.
# =============================================================================
# ===========================================
# properties defining various directory
# locations
# ===========================================
build.dir=${package.build.dir}
build.resources.dir=${build.dir}/resources
package.resources.dir=${package.dir}/resources
package.sass.dir=${package.dir}/sass
package.licenses.dir=${package.dir}/licenses
# ===========================================
# definitions of various file name patterns
# used for output artifacts
# ===========================================
build.name.prefix=${build.dir}/${package.name}
build.name.css.prefix=${build.resources.dir}/${package.name}
build.name.ruby=config.rb
build.debug.suffix=-debug
build.all.suffix=-all
build.rtl.suffix=-rtl
build.all.debug.suffix=${build.all.suffix}${build.debug.suffix}
build.all.rtl.suffix=${build.all.suffix}${build.rtl.suffix}
build.all.rtl.debug.suffix=${build.all.suffix}${build.rtl.suffix}${build.debug.suffix}
# ===========================================
# define the output js file names for dev,
# debug, and compressed (no suffix)
# ===========================================
build.all.js=${build.name.prefix}.js
build.all.debug.js=${build.name.prefix}${build.debug.suffix}.js
# ===========================================
# output file names for the scss files
# ===========================================
build.all.scss=${build.name.prefix}${build.all.debug.suffix}.scss
build.all.rtl.scss=${build.name.prefix}${build.all.rtl.debug.suffix}.scss
# ===========================================
# output file names for the css files
# generated from the scss files by running
# a compass compilation
# ===========================================
build.all.css.debug.prefix=${package.name}${build.all.debug.suffix}
build.all.css.debug=${build.resources.dir}/${build.all.css.debug.prefix}.css
build.all.rtl.css.debug.prefix=${package.name}${build.all.rtl.debug.suffix}
build.all.rtl.css.debug=${build.resources.dir}/${build.all.rtl.css.debug.prefix}.css
build.all.css.prefix=${package.name}${build.all.suffix}
build.all.css=${build.resources.dir}/${build.all.css.prefix}.css
build.all.rtl.css.prefix=${package.name}${build.all.rtl.suffix}
build.all.rtl.css=${build.resources.dir}/${build.all.rtl.css.prefix}.css
build.all.ruby=${build.dir}/${build.name.ruby}
# ===========================================
# options to pass to the 'sencha fs slice' command
# ===========================================
build.slice.options=
# ===========================================
# preprocessor options used when generating
# concatenated js output files
# ===========================================
build.compile.js.debug.options=debug:true
build.compile.js.options=debug:false
# enables / disables removing text references from
# package js build files
build.remove.references=false
# This property can be modified to change general build options
# such as excluding files from the set. The format expects newlines
# for each argument, for example:
#
# build.operations=\
# exclude\n \
# -namespace=Ext\n
#
# NOTE: modifications to build.operations are intended to be
# placed in an override of the "-after-init" target, where it
# can be calculated based on other
# ant properties
#
# build.operations=
# ===========================================
# compression option used to generate '-all'
# js output file
# ===========================================
build.compile.js.compress=+yui
# ===========================================
# selector count threshold to use when
# splitting a single css file into multiple
# css files (IE selector limit workaround)
# ===========================================
build.css.selector.limit=4095
# controls the ruby command used to execute compass. a full path
# to ruby may be specified rather than allowing the system shell
# to resolve the command
build.ruby.path=ruby
# controls the working directory of the child compass process
# and the output location for the .sass-cache folder
compass.working.dir=${build.dir}
# enables / disables console highlighting for compass
compass.compile.boring=false
# enables / disables forced rebuilds for compass
compass.compile.force=true
# enables / disables stack traces in compass failure output
compass.compile.trace=true
# ===========================================
# Options for sub-packages
# Set to true/1 to enable build.version inheritance by sub-pacakges
build.subpkgs.inherit.version=0
# ===========================================
# theme slicing example page settings
# ===========================================
package.example.dir=${package.dir}/sass/example
package.example.base=${build.all.rtl.css.debug.prefix}
package.example.css.rel=resources/${package.example.base}.css
package.example.css=${build.dir}/${package.example.css.rel}
package.example.scss=${build.dir}/${package.example.base}.scss
package.example.theme.html=${package.example.dir}/theme.html
bootstrap.base.path=${package.example.dir}
bootstrap.example.js=${package.example.dir}/bootstrap.js
# ===========================================
# options controlling output packaging
# operations for output '.pkg' file
# ===========================================
pkg.build.dir=${workspace.build.dir}/${package.name}
pkg.file.name=${package.name}.pkg
pkg.includes=**/*
pkg.excludes=package.json
<project name="find-cmd-impl">
<!--
Run "sencha which" to find the Sencha Cmd basedir and get "cmd.dir" setup. We
need to execute the command with curdir set properly for Cmd to pick up that we
are running for an application.
-->
<target name="find-cmd-in-path" unless="cmd.dir">
<exec executable="sencha"
dir="${basedir}"
failifexecutionfails="false"
outputproperty="exec.error">
<arg value="which"/>
<arg value="-p=cmd.dir"/>
<arg value="-o=$cmddir$"/>
</exec>
<!-- Now read the generated properties file and delete it -->
<property file="$cmddir$"/>
<delete file="$cmddir$"/>
</target>
<!--
Run "sencha which" again, similar to the above target, but explicitly check
for the 'SENCHA_CMD' environment variable to have been set, in case sencha
cmd isn't on the current path settings for the user
-->
<target name="find-cmd-in-environment" unless="cmd.dir">
<exec executable="${env.SENCHA_CMD}/sencha"
dir="${basedir}"
failifexecutionfails="false">
<arg value="which"/>
<arg value="-p=cmd.dir"/>
<arg value="-o=$cmddir$"/>
</exec>
<property file="$cmddir$"/>
<delete file="$cmddir$"/>
</target>
<!--
== Mac OSX launchd fix ==
create a child shell process that will source in ~/.bash_profile
and then attempt to call 'sencha which' with the current user's
shell profile settings. sencha which will create a properties file
that can then be loaded into this (the parent) process.
This allows ant integrations in IDE's like netbeans or eclipse to properly
locate Sencha Cmd, even if the IDE was launched via launchd (Finder)
-->
<target name="find-cmd-in-shell" unless="cmd.dir">
<delete quiet="true" file="$cmddir$"/>
<echo file="tmp.sh"> source ~/.bash_profile; sencha which -p cmd.dir -o '$cmddir$'</echo>
<exec executable="/bin/sh"><arg value="tmp.sh"/></exec>
<property file="$cmddir$"/>
<delete file="tmp.sh"/>
<delete file="$cmddir$"/>
</target>
</project>
\ No newline at end of file
<project name="init-impl">
<!--
Init-Local
-->
<target name="-before-init-local"/>
<target name="-init-local">
<!--
${basedir} is actually the basedir of build.xml, in the app root
so this imports ${app.dir}/local.properties, if present
-->
<property file="${basedir}/local.properties"/>
<!--
This will traverse upwards in the file system, starting at the
app root directory, looking for the workspace. Once found,
${workspace.dir}/local.properties will be imported into this
project
-->
<script language="javascript">
<![CDATA[
var f = new java.io.File(project.getProperty("basedir"));
var sub = ".sencha/workspace/sencha.cfg";
for (var p = f; p; p = p.getParentFile()) {
var t = new java.io.File(p, sub);
if (t.exists()) {
// we found the workspace folder!
t = new java.io.File(p, "local.properties");
if (t.exists()) {
var loader = project.createTask("property");
loader.setFile(new java.io.File(t.getCanonicalPath()));
loader.execute();
}
break;
}
}
]]>
</script>
</target>
<target name="-after-init-local"/>
<target name="init-local"
depends="-before-init-local,-init-local,-after-init-local"/>
<!--
Apply Version
-->
<target name="-before-apply-version"/>
<target name="-after-apply-version"/>
<target name="apply-version" if="build.version">
<echo>Switch package version to ${build.version}</echo>
<antcall target="-before-apply-version"/>
<x-set-json-version file="${basedir}/package.json"
version="${build.version}"/>
<antcall target="-after-apply-version"/>
</target>
<target name="-before-init"/>
<target name="-init" unless="internal.x-sencha-initialized">
<antcall target="apply-version"/>
<!--
Now, apply various project updates, such as ant class loader path
updates, as well as loading Sencha Cmd config system properties
into ant property space
-->
<x-sencha-init prefix=""/>
<!--
default the build environment to production if it is unset by this point
-->
<property name="build.environment" value="production"/>
<property name="CR" value="&#10;"/>
<property name="build.version" value="${package.version}"/>
<x-load-properties>
<file path="${package.config.dir}/${build.environment}.properties" required="false"/>
<file path="${package.config.dir}/build.properties" required="false"/>
<file path="${package.config.dir}/defaults.properties" required="true"/>
</x-load-properties>
<!--
See if there is a ./resources subfolder
-->
<if>
<not>
<available file="${package.resources.dir}" type="dir"/>
</not>
<then>
<property name="skip.resources" value="1"/>
<property name="skip.slice" value="1"/>
</then>
</if>
<!--
See if there is a ./sass subfolder
-->
<if>
<not>
<available file="${package.sass.dir}" type="dir"/>
</not>
<then>
<property name="skip.sass" value="1"/>
</then>
</if>
<!--
Slicing operations are not needed when using the touch framework
or for non-theme packages
-->
<if>
<or>
<not>
<equals arg1="theme" arg2="${package.type}"/>
</not>
<equals arg1="touch" arg2="${framework.name}"/>
</or>
<then>
<property name="skip.slice" value="1"/>
</then>
</if>
<!--
See if there is an ./examples subfolder full of example applications.
-->
<if>
<not>
<available file="${package.examples.dir}" type="dir"/>
</not>
<then>
<property name="skip.examples" value="1"/>
</then>
</if>
<!--
See if there is a ./packages subfolder full of packages. This is only allowed
for framework packages.
-->
<if>
<not>
<and>
<equals arg1="${package.type}" arg2="framework"/>
<available file="${package.subpkgs.dir}" type="dir"/>
</and>
</not>
<then>
<property name="skip.subpkgs" value="1"/>
</then>
</if>
<if>
<not>
<isset property="package.framework"/>
</not>
<then>
<property name="skip.style" value="1"/>
</then>
</if>
<if>
<isset property="skip.style"/>
<then>
<property name="skip.sass" value="1"/>
<property name="skip.capture" value="1"/>
<property name="skip.slice" value="1"/>
</then>
</if>
<if>
<not>
<isset property="package.base.names"/>
</not>
<then>
<property name="skip.inherit" value="1"/>
</then>
</if>
<!--
this id string is used to share a common compiler instance
for all x-compile calls in this project
-->
<property name="compiler.ref.id" value="package-compiler"/>
<fileset id="pkg.files"
dir="${package.dir}"
includes="${pkg.includes}"
excludes="${pkg.excludes}">
<exclude name="**/.sass-cache/**/*"/>
<exclude name="**/.sass-cache"/>
<exclude name="**/theme-capture.*"/>
</fileset>
<!--
this property is set indicating we've reached the end of the
core init phase. it's presence will indicate that we've already
executed this target, and will bypass firing the init code
repeatedly in sub projects (antcall, x-ant-call)
See the above 'unless' attribute on the -init target
-->
<property name="internal.x-sencha-initialized" value="true"/>
</target>
<target name="-after-init"/>
<target name="-before-init-defaults"/>
<target name="-init-defaults">
<!--
This property can be modified to change general build options
such as excluding files from the set. The format expects newlines
for each argument, for example:
<property name="build.operations"/>
exclude
-namespace=Ext
</property>
-->
<property name="build.operations" value=""/>
<!--
This property can be modified to change concatenation
specific options
-strip-comments: comment suppression
-remove-text-references: transform string literal class references to objects
-beautify: unpack the source
<property name="build.concat.options"/>
-strip-comments
-remove-text-references
-beautify
</property>
-->
<property name="build.concat.options" value=""/>
<property name="build.concat.debug.options" value=""/>
<property name="build.pkg.manifest" value="pkg.files"/>
</target>
<target name="-after-init-defaults"/>
<!--
Initializes the compiler instances, reading in the app.json and package.json
definitions, as well as scanning and parsing all js files found on the
various classpath entries for the framework, workspace, packages, and app
-->
<target name="-init-compiler" depends="-init">
<x-compile refid="${compiler.ref.id}"
dir="${package.dir}"
initOnly="true"
inheritAll="true">
<![CDATA[
# base build command
-tempDir=${build.compile.temp.dir}
-keepTempDir=${build.compile.temp.dir.keep}
include
-all
and
save
package-${package.name}-all
]]>
</x-compile>
</target>
</project>
\ No newline at end of file
<project name="js-impl">
<target name="-init-compile-js" depends="-init-compiler">
<if>
<equals arg1="theme" arg2="${package.type}"/>
<then>
<property name="build.compile.js.filter">
<![CDATA[
union
-tag=package-${package.name}
and
include
-tag=package-${package.name}-base
and
${build.operations}
]]>
</property>
</then>
<else>
<property name="build.compile.js.filter">
<![CDATA[
union
-tag=package-${package.name}
and
${build.operations}
]]>
</property>
</else>
</if>
</target>
<target name="-compile-js-debug" depends="-init-compile-js">
<x-compile refid="${compiler.ref.id}">
<![CDATA[
restore
package-${package.name}-all
and
-options=${build.compile.js.debug.options}
${build.compile.js.filter}
and
concatenate
-remove-text-references=${build.remove.references}
-output-file=${build.all.debug.js}
${build.concat.debug.options}
]]>
</x-compile>
</target>
<target name="-compile-js-non-debug" depends="-init-compile-js">
<x-compile refid="${compiler.ref.id}">
<![CDATA[
restore
package-${package.name}-all
and
-options=${build.compile.js.options}
${build.compile.js.filter}
and
concatenate
-remove-text-references=${build.remove.references}
${build.compile.js.compress}
-output-file=${build.all.js}
${build.concat.options}
]]>
</x-compile>
</target>
<target name="-before-js"/>
<target name="-after-js"/>
<target name="-js"
depends="-compile-js-debug,-compile-js-non-debug"/>
</project>
\ No newline at end of file
<project basedir=".">
<!--
This file can be freely edited, so long as the <import file="${sencha.workspace.config.dir}/plugin.xml"/>
statement is not removed.
One of the purposes of this file is to hook various Sencha Command operations and do
processing before or after the command is processed. To do this, simply provide the
logic in a <target> using one of these names:
-before-generate-app Called before an application is generated
-after-generate-app Called after an application is generated
-before-generate-controller Called before a controller is generated
-after-generate-controller Called after a controller is generated
-before-generate-model Called before a model is generated
-after-generate-model Called after a model is generated
-before-generate-profile Called before a profile is generated
-after-generate-profile Called after a profile is generated
-->
<import file="${workspace.config.dir}/plugin.xml"/>
<!--
<target name="-after-generate-model">
... use ${args.path}, ${args.name} and ${args.fields} as needed ...
</target>
Other targets are similar. There are properties prefixed with "args." and the name of
the command line option that hold the parameters for the command.
-->
</project>
<project name="refresh-impl">
<import file="bootstrap-impl.xml"/>
<target name="-refresh-pkg" depends="init"/>
<!--
Refresh app
-->
<target name="-before-refresh"/>
<target name="-refresh" depends="-refresh-pkg"/>
<target name="-after-refresh"/>
</project>
\ No newline at end of file
<project name="resources-impl">
<target name="-before-inherit-resources"/>
<target name="-after-inherit-resources"/>
<target name="-inherit-resources">
<for list="${package.base.packages}" param="base">
<sequential>
<local name="base.path"/>
<local name="base.resource.path"/>
<property name="base.path" location="@{base}"/>
<property name="base.resource.path" location="${base.path}/resources"/>
<echo>Merging resources from base package ${base.path}</echo>
<if>
<available file="${base.resource.path}" type="dir"/>
<then>
<copy todir="${build.dir}/resources/" overwrite="true">
<fileset dir="${base.resource.path}" includes="**/*"/>
</copy>
</then>
</if>
</sequential>
</for>
</target>
<target name="-before-copy-resources"/>
<target name="-after-copy-resources"/>
<target name="-copy-resources">
<echo>Merging resources from current package ${package.resources.dir}</echo>
<copy todir="${build.dir}/resources" overwrite="true">
<fileset dir="${package.resources.dir}" includes="**/*"/>
</copy>
</target>
</project>
\ No newline at end of file
<project name="sass-impl">
<target name="-init-sass-compiler">
<x-normalize-path path="${build.dir}/resources"
property="image.search.path"/>
</target>
<target name="-compile-sass-rtl" depends="-init-sass-compiler">
<x-compile refid="${compiler.ref.id}">
<![CDATA[
include
-all
and
sass
-etc=true
-vars=true
-rules=true
-class-name-vars=true
-variable=$image-search-path:'${image.search.path}' !default
-variable=$theme-name: '${package.name}' !default
-output=${build.all.rtl.scss}
and
sass
-ruby=true
-output=${build.all.ruby}
]]>
</x-compile>
</target>
<target name="-compile-sass-ltr" depends="-init-sass-compiler">
<x-compile refid="${compiler.ref.id}">
<![CDATA[
exclude
-all
and
include
-not
-namespace=Ext.rtl
and
sass
-etc=true
-vars=true
-rules=true
-class-name-vars=true
-variable=$image-search-path:'${image.search.path}' !default
-variable=$theme-name: '${package.name}' !default
-output=${build.all.scss}
and
sass
-ruby=true
-output=${build.all.ruby}
]]>
</x-compile>
</target>
<target name="-compile-sass"
depends="-compile-sass-rtl,-compile-sass-ltr"/>
<macrodef name="x-compress-css-files">
<attribute name="dir"/>
<attribute name="prefix"/>
<attribute name="outprefix"/>
<sequential>
<x-split-css file="@{dir}/@{prefix}.css"
outdir="${build.resources.dir}"
limit="${build.css.selector.limit}"/>
<for param="cssfile">
<fileset dir="@{dir}" includes="@{prefix}*.css"/>
<sequential>
<local name="css.output.name"/>
<local name="pattern"/>
<property name="pattern" value="(.*?)(@{prefix})(_\d{1,2})*\.css"/>
<propertyregex property="css.output.name"
input="@{cssfile}"
regexp="${pattern}"
select="\1@{outprefix}\3.css"
override="true"/>
<x-compress-css srcfile="@{cssfile}"
outfile="${css.output.name}"/>
</sequential>
</for>
</sequential>
</macrodef>
<target name="-compass-compile" depends="-compile-sass">
<x-compass-compile
rubyPath="${build.ruby.path}"
trace="${compass.compile.trace}"
boring="${compass.compile.boring}"
force="${compass.compile.force}"
dir="${compass.working.dir}"
sassdir="${build.dir}"
cssdir="${build.dir}/resources"
config="${build.all.ruby}"/>
</target>
<target name="-compile-css" depends="-compass-compile">
<x-compress-css-files
dir="${build.resources.dir}"
prefix="${build.all.css.debug.prefix}"
outprefix="${build.all.css.prefix}"/>
<x-compress-css-files
dir="${build.resources.dir}"
prefix="${build.all.rtl.css.debug.prefix}"
outprefix="${build.all.rtl.css.prefix}"/>
</target>
<target name="-before-sass"/>
<target name="-sass" depends="-compile-css"/>
<target name="-after-sass"/>
</project>
\ No newline at end of file
# The name of the package - should match the "name" property in ./package.json
#
package.name=ext-theme-crisp-touch
# The namespace to which this package's SASS corresponds. The default value of
# "Ext" means that the files in ./sass/src (and ./sass/var) match classes in
# the Ext" root namespace. In other words, "Ext.panel.Panel" maps to
# ./sass/src/panel/Panel.scss.
#
# To style classes from any namespace, set this to blank. If this is blank,
# then to style "Ext.panel.Panel" you would put SASS in
# ./sass/src/Ext/panel/Panel.scss.
#
package.sass.namespace=Ext
# This is the comma-separated list of folders where classes reside. These
# classes must be explicitly required to be included in the build.
#
package.classpath=${package.dir}/src
# This is the comma-separated list of folders of overrides. All files in this
# path will be given a tag of "packageOverrides" which is automatically
# required in generated apps by the presence of this line in app.js:
#
# //@require @packageOverrides
#
package.overrides=${package.dir}/overrides
# This is the folder where SASS "src" resides. This is searched for SCSS
# files that match the JavaScript classes used by the application.
#
package.sass.srcpath=${package.dir}/sass/src
# This is the folder where SASS "vars" resides. This is searched for SCSS
# files that match the JavaScript classes used by the application.
#
package.sass.varpath=${package.dir}/sass/var
# This file is automatically imported into the SASS build before "vars".
#
package.sass.etcpath=${package.dir}/sass/etc/all.scss
# This is the folder in which to place "sencha packaage build" output.
#
package.build.dir=${package.dir}/build
# The folder that contains example application(s) for this package.
#
package.examples.dir=${package.dir}/examples
# The folder that contains sub-packages of this package. Only valid for "framework"
# package type.
#
package.subpkgs.dir=${package.dir}/packages
#==============================================================================
# Custom Properties - Place customizations below this line to avoid merge
# conflicts with newer versions
package.cmd.version=5.0.0.160
package.framework=ext
skip.pkg=1
\ No newline at end of file
<project name="slice-impl">
<target name="-generate-slicer-bootstrap" depends="-init-compiler">
<local name="relpath"/>
<x-get-relative-path from="${bootstrap.base.path}"
to="${framework.packages.dir}"
property="relpath"/>
<local name="override.tpl"/>
<local name="override.tpl.type"/>
<x-script-def name="x-detect-sencha-5">
<![CDATA[
importPackage(com.sencha.util);
importPackage(com.sencha.logging);
var frameworkName = project.getProperty("framework.name"),
frameworkVersion = project.getProperty("framework.version") || "0.0.0.0";
try {
var frameworkVer = new Version(frameworkVersion),
limit = new Version('5.0.0.0');
if(frameworkVer.compareTo(limit) >= 0) {
project.setProperty('override.tpl.type', 'jsonp');
project.setProperty('override.tpl', 'Ext.Loader.loadScriptsSync');
}
} catch (err) {
}
]]>
</x-script-def>
<x-detect-sencha-5/>
<property name="override.tpl.type" value="tpl"/>
<property name="override.tpl" value='Ext.Loader.loadScriptFile("{0}", Ext.emptyFn);'/>
<x-bootstrap file="${bootstrap.example.js}"
basedir="${bootstrap.base.path}"
includeBoot="true"
includeCoreFiles="true"
overrideTpl="${override.tpl}"
overrideTplType="${override.tpl.type}"
overrideExcludeTags="">
<![CDATA[
Ext.Boot.loadSync([
"render.js",
"${relpath}/ext-theme-base/sass/example/manifest.js",
"${relpath}/ext-theme-base/sass/example/shortcuts.js",
"custom.js"
]);
]]>
</x-bootstrap>
</target>
<target name="-update-slicer-css">
<x-get-relative-path
from="${package.example.dir}"
to="${package.example.css}"
property="package.example.css.path"
/>
<!--update the app's example to point to the build output-->
<echo file="${package.example.dir}/example.css">
/*
* This file is generated by Sencha Cmd and should NOT be edited. It redirects
* to the most recently built CSS file for the application to allow theme.html
* to load properly for image slicing (required to support non-CSS3 browsers
* such as IE9 and below).
*/
@import '${package.example.css.path}';
</echo>
</target>
<target name="-capture-theme-image"
depends="-generate-slicer-bootstrap,-update-slicer-css">
<echo>Capture theme image to ${build.dir}/theme-capture.png</echo>
<x-sencha-command dir="${package.dir}">
<![CDATA[
theme
capture
-page=${package.sass.dir}/example/theme.html
-image=${build.dir}/theme-capture.png
-manifest=${build.dir}/theme-capture.json
]]>
</x-sencha-command>
</target>
<target name="-slice-theme-images" depends="-capture-theme-image">
<echo>Slicing theme images to ${build.resources.dir}</echo>
<x-sencha-command dir="${package.dir}">
<![CDATA[
fs
slice
${build.slice.options}
-image=${build.dir}/theme-capture.png
-manifest=${build.dir}/theme-capture.json
-out=${build.resources.dir}
]]>
</x-sencha-command>
</target>
<target name="-before-slice"/>
<target name="-after-slice"/>
<target name="-slice"
depends="-slice-theme-images"/>
</project>
\ No newline at end of file
<project name="package.sub.builds">
<macrodef name="x-process-sub-packages">
<attribute name="all" default="false"/>
<element name="tasks" implicit="true"/>
<sequential>
<if>
<and>
<isset property="package.subpkgs.dir"/>
<available file="${package.subpkgs.dir}" type="dir"/>
</and>
<then>
<local name="sub.packages.list"/>
<condition property="sub.packages.list" value="${package.subpkgs}">
<and>
<isset property="package.subpkgs"/>
<equals arg1="@{all}" arg2="false"/>
</and>
</condition>
<property name="sub.packages.list" value="*"/>
<for param="pkg-dir">
<dirset dir="${package.subpkgs.dir}" includes="${sub.packages.list}"/>
<sequential>
<if>
<available file="@{pkg-dir}/.sencha/package/sencha.cfg"/>
<then>
<tasks/>
</then>
</if>
</sequential>
</for>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="x-process-examples">
<attribute name="all" default="false"/>
<element name="tasks" implicit="true"/>
<sequential>
<if>
<and>
<isset property="package.examples.dir"/>
<available file="${package.examples.dir}" type="dir"/>
</and>
<then>
<local name="example.list"/>
<condition property="example.list" value="${package.examples}">
<and>
<isset property="package.examples"/>
<equals arg1="@{all}" arg2="false"/>
</and>
</condition>
<property name="example.list" value="*"/>
<for param="example-dir">
<dirset dir="${package.examples.dir}" includes="${example.list}"/>
<sequential>
<if>
<available file="@{example-dir}/.sencha/app/sencha.cfg"/>
<then>
<tasks/>
</then>
</if>
</sequential>
</for>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="x-run-sub-build">
<attribute name="dir"/>
<attribute name="target"/>
<element name="properties" implicit="true"/>
<sequential>
<if>
<available file="@{dir}/build.xml"/>
<then>
<local name="sub.name"/>
<basename file="@{dir}"
property="sub.name"/>
<ant dir="@{dir}"
inheritall="false"
inheritrefs="true"
target="@{target}">
<property name="compiler.ref.id"
value="compiler-${sub.name}"/>
<properties/>
</ant>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="x-sub-build">
<attribute name="dir"/>
<attribute name="target" default="build"/>
<attribute name="inherit-version" default="0"/>
<sequential>
<if>
<x-is-true value="@{inherit-version}"/>
<then>
<x-run-sub-build dir="@{dir}" target="@{target}">
<property name="cmd.dir" value="${cmd.dir}"/>
<property name="build.version" value="${build.version}"/>
</x-run-sub-build>
</then>
<else>
<x-run-sub-build dir="@{dir}" target="@{target}">
<property name="cmd.dir" value="${cmd.dir}"/>
</x-run-sub-build>
</else>
</if>
</sequential>
</macrodef>
<target name="-before-subpkgs"/>
<target name="-after-subpkgs"/>
<target name="-subpkgs">
<x-process-sub-packages>
<x-sub-build dir="@{pkg-dir}"
inherit-version="${build.subpkgs.inherit.version}"/>
</x-process-sub-packages>
</target>
<target name="-before-clean-subpkgs"/>
<target name="-after-clean-subpkgs"/>
<target name="-clean-subpkgs">
<x-process-sub-packages>
<x-sub-build dir="@{pkg-dir}"
target="clean"
inherit-version="${build.subpkgs.inherit.version}"/>
</x-process-sub-packages>
</target>
<target name="-before-upgrade-subpkgs"/>
<target name="-after-upgrade-subpkgs"/>
<target name="-upgrade-subpkgs">
<x-process-sub-packages all="true">
<x-sencha-command dir="@{pkg-dir}" inheritall="false">
<property name="args.force" value="true"/>
package
upgrade
</x-sencha-command>
<delete dir="@{example-dir}/.sencha_backup"/>
</x-process-sub-packages>
</target>
<target name="-before-examples"/>
<target name="-after-examples"/>
<target name="-examples">
<x-process-examples>
<echo>Building example in @{example-dir}</echo>
<x-sencha-command dir="@{example-dir}" inheritall="false">
app
build
</x-sencha-command>
</x-process-examples>
</target>
<target name="-before-upgrade-examples"/>
<target name="-after-upgrade-examples"/>
<target name="-upgrade-examples">
<x-process-examples all="true">
<echo>Upgrading example in @{example-dir}</echo>
<x-sencha-command dir="@{example-dir}" inheritall="false">
<property name="args.force" value="true"/>
app
upgrade
</x-sencha-command>
<delete dir="@{example-dir}/.sencha_backup"/>
</x-process-examples>
</target>
<target name="-before-clean-examples"/>
<target name="-after-clean-examples"/>
<target name="-clean-examples">
<x-process-examples all="true">
<echo>Cleaning example in @{example-dir}</echo>
<x-sub-build dir="@{example-dir}"
target="clean"/>
</x-process-examples>
</target>
</project>
\ No newline at end of file
# ===========================================
# This file defines properties used by
# build-impl.xml, which is the base impl
# of an applications build process. The
# properties from this file correspond to the
# 'testing' build environment, specified
# by 'sencha app build testing'. These will
# take precedence over defaults provided by
# build.properties.
# ===========================================
# ===========================================
# compression option used to generate '-all'
# js output file. this value disables
# compression for testing builds
# ===========================================
build.compile.js.compress=
<?xml version="1.0" encoding="utf-8"?>
<project name="ext-theme-crisp-touch" default=".help">
<!--
The build-impl.xml file imported here contains the guts of the build process. It is
a great idea to read that file to understand how the process works, but it is best to
limit your changes to this file.
-->
<import file="${basedir}/.sencha/package/build-impl.xml"/>
<!--
The following targets can be provided to inject logic before and/or after key steps
of the build process:
The "init-local" target is used to initialize properties that may be personalized
for the local machine.
<target name="-before-init-local"/>
<target name="-after-init-local"/>
The "clean" target is used to clean build output from the build.dir.
<target name="-before-clean"/>
<target name="-after-clean"/>
The general "init" target is used to initialize all other properties, including
those provided by Sencha Cmd.
<target name="-before-init"/>
<target name="-after-init"/>
The "build" target performs the call to Sencha Cmd to build the application.
<target name="-before-build"/>
<target name="-after-build"/>
-->
</project>
require '../../ext-theme-base/sass/utils.rb'
require '../sass/config.rb'
Ext.define("ExtThemeNeptune.Component",{override:"Ext.Component",initComponent:function(){this.callParent();if(this.dock&&this.border===undefined){this.border=false}},privates:{initStyles:function(){var c=this,b=c.hasOwnProperty("border"),a=c.border;if(c.dock){c.border=null}c.callParent(arguments);if(b){c.border=a}else{delete c.border}}}});Ext.define("ExtThemeNeptune.toolbar.Toolbar",{override:"Ext.toolbar.Toolbar",usePlainButtons:false,border:false});Ext.define("ExtThemeNeptune.layout.component.Dock",{override:"Ext.layout.component.Dock",noBorderClassTable:[0,Ext.baseCSSPrefix+"noborder-l",Ext.baseCSSPrefix+"noborder-b",Ext.baseCSSPrefix+"noborder-bl",Ext.baseCSSPrefix+"noborder-r",Ext.baseCSSPrefix+"noborder-rl",Ext.baseCSSPrefix+"noborder-rb",Ext.baseCSSPrefix+"noborder-rbl",Ext.baseCSSPrefix+"noborder-t",Ext.baseCSSPrefix+"noborder-tl",Ext.baseCSSPrefix+"noborder-tb",Ext.baseCSSPrefix+"noborder-tbl",Ext.baseCSSPrefix+"noborder-tr",Ext.baseCSSPrefix+"noborder-trl",Ext.baseCSSPrefix+"noborder-trb",Ext.baseCSSPrefix+"noborder-trbl"],edgeMasks:{top:8,right:4,bottom:2,left:1},handleItemBorders:function(){var y=this,f=0,z=8,A=4,l=2,e=1,a=y.owner,s=a.bodyBorder,n=a.border,j=y.collapsed,p=y.edgeMasks,k=y.noBorderClassTable,x=a.dockedItems.generation,w,d,v,h,r,m,u,o,g,q,t,c;if(y.initializedBorders===x){return}t=[];c=[];d=y.getBorderCollapseTable();k=y.getBorderClassTable?y.getBorderClassTable():k;y.initializedBorders=x;y.collapsed=false;v=y.getDockedItems();y.collapsed=j;for(r=0,m=v.length;r<m;r++){u=v[r];if(u.ignoreBorderManagement){continue}o=u.dock;q=h=0;t.length=0;c.length=0;if(o!=="bottom"){if(f&z){w=u.border}else{w=n;if(w!==false){h+=z}}if(w===false){q+=z}}if(o!=="left"){if(f&A){w=u.border}else{w=n;if(w!==false){h+=A}}if(w===false){q+=A}}if(o!=="top"){if(f&l){w=u.border}else{w=n;if(w!==false){h+=l}}if(w===false){q+=l}}if(o!=="right"){if(f&e){w=u.border}else{w=n;if(w!==false){h+=e}}if(w===false){q+=e}}if((g=u.lastBorderMask)!==q){u.lastBorderMask=q;if(g){c[0]=k[g]}if(q){t[0]=k[q]}}if((g=u.lastBorderCollapse)!==h){u.lastBorderCollapse=h;if(g){c[c.length]=d[g]}if(h){t[t.length]=d[h]}}if(c.length){u.removeCls(c)}if(t.length){u.addCls(t)}f|=p[o]}q=h=0;t.length=0;c.length=0;if(f&z){w=s}else{w=n;if(w!==false){h+=z}}if(w===false){q+=z}if(f&A){w=s}else{w=n;if(w!==false){h+=A}}if(w===false){q+=A}if(f&l){w=s}else{w=n;if(w!==false){h+=l}}if(w===false){q+=l}if(f&e){w=s}else{w=n;if(w!==false){h+=e}}if(w===false){q+=e}if((g=y.lastBodyBorderMask)!==q){y.lastBodyBorderMask=q;if(g){c[0]=k[g]}if(q){t[0]=k[q]}}if((g=y.lastBodyBorderCollapse)!==h){y.lastBodyBorderCollapse=h;if(g){c[c.length]=d[g]}if(h){t[t.length]=d[h]}}if(c.length){a.removeBodyCls(c)}if(t.length){a.addBodyCls(t)}},onRemove:function(b){var a=b.lastBorderMask;if(!b.isDestroyed&&!b.ignoreBorderManagement&&a){b.lastBorderMask=0;b.removeCls(this.noBorderClassTable[a])}this.callParent([b])}});Ext.define("ExtThemeNeptune.panel.Panel",{override:"Ext.panel.Panel",border:false,bodyBorder:false,initBorderProps:Ext.emptyFn,initBodyBorder:function(){if(this.bodyBorder!==true){this.callParent()}}});Ext.define("ExtThemeNeptune.panel.Table",{override:"Ext.panel.Table",initComponent:function(){var a=this;if(!a.hasOwnProperty("bodyBorder")&&!a.hideHeaders){a.bodyBorder=true}a.callParent()}});Ext.define("Ext.theme.crisp.view.Table",{override:"Ext.view.Table",stripeRows:false});Ext.define("ExtThemeNeptune.resizer.Splitter",{override:"Ext.resizer.Splitter",size:8});Ext.define("Ext.touch.sizing.resizer.Splitter",{override:"Ext.resizer.Splitter",size:16});Ext.define("ExtThemeNeptune.container.ButtonGroup",{override:"Ext.container.ButtonGroup",usePlainButtons:false});Ext.define("Ext.touch.sizing.form.trigger.Spinner",{override:"Ext.form.trigger.Spinner",vertical:false});Ext.define("ExtThemeNeptune.toolbar.Paging",{override:"Ext.toolbar.Paging",defaultButtonUI:"plain-toolbar",inputItemWidth:40});Ext.define("ExtThemeNeptune.picker.Month",{override:"Ext.picker.Month",measureMaxHeight:36});Ext.define("ExtThemeNeptune.form.field.HtmlEditor",{override:"Ext.form.field.HtmlEditor",defaultButtonUI:"plain-toolbar"});Ext.define("ExtThemeNeptune.grid.RowEditor",{override:"Ext.grid.RowEditor",buttonUI:"default-toolbar"});Ext.define("ExtThemeNeptune.grid.column.RowNumberer",{override:"Ext.grid.column.RowNumberer",width:25});Ext.define("ExtThemeNeptune.menu.Separator",{override:"Ext.menu.Separator",border:true});Ext.define("ExtThemeNeptune.menu.Menu",{override:"Ext.menu.Menu",showSeparator:false});Ext.define("Ext.touch.sizing.grid.plugin.RowExpander",{override:"Ext.grid.plugin.RowExpander",headerWidth:32});Ext.define("Ext.touch.sizing.selection.CheckboxModel",{override:"Ext.selection.CheckboxModel",headerWidth:32});
\ No newline at end of file
# ext-theme-crisp-touch/resources
This folder contains static resources (typically an `"images"` folder as well).
@import 'ext-theme-crisp-touch-all-rtl-debug_01.css';
@import 'ext-theme-crisp-touch-all-rtl-debug_02.css';
@import 'ext-theme-crisp-touch-all-rtl-debug_01.css';@import 'ext-theme-crisp-touch-all-rtl-debug_02.css';
\ No newline at end of file