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.

1 <?xml version="1.0" encoding="UTF-8"?>
2 <classpath>
3 <classpathentry kind="src" output="target/classes" path="src/main/java">
4 <attributes>
5 <attribute name="optional" value="true"/>
6 <attribute name="maven.pomderived" value="true"/>
7 </attributes>
8 </classpathentry>
9 <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10 <attributes>
11 <attribute name="maven.pomderived" value="true"/>
12 </attributes>
13 </classpathentry>
14 <classpathentry kind="src" output="target/test-classes" path="src/test/java">
15 <attributes>
16 <attribute name="optional" value="true"/>
17 <attribute name="maven.pomderived" value="true"/>
18 </attributes>
19 </classpathentry>
20 <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
21 <attributes>
22 <attribute name="maven.pomderived" value="true"/>
23 </attributes>
24 </classpathentry>
25 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
26 <attributes>
27 <attribute name="maven.pomderived" value="true"/>
28 </attributes>
29 </classpathentry>
30 <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
31 <attributes>
32 <attribute name="maven.pomderived" value="true"/>
33 <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
34 </attributes>
35 </classpathentry>
36 <classpathentry kind="output" path="target/classes"/>
37 </classpath>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <projectDescription>
3 <name>DevTools</name>
4 <comment></comment>
5 <projects>
6 </projects>
7 <buildSpec>
8 <buildCommand>
9 <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
10 <arguments>
11 </arguments>
12 </buildCommand>
13 <buildCommand>
14 <name>org.eclipse.ajdt.core.ajbuilder</name>
15 <arguments>
16 </arguments>
17 </buildCommand>
18 <buildCommand>
19 <name>org.eclipse.wst.common.project.facet.core.builder</name>
20 <arguments>
21 </arguments>
22 </buildCommand>
23 <buildCommand>
24 <name>org.eclipse.wst.validation.validationbuilder</name>
25 <arguments>
26 </arguments>
27 </buildCommand>
28 <buildCommand>
29 <name>org.springframework.ide.eclipse.core.springbuilder</name>
30 <arguments>
31 </arguments>
32 </buildCommand>
33 <buildCommand>
34 <name>org.eclipse.m2e.core.maven2Builder</name>
35 <arguments>
36 </arguments>
37 </buildCommand>
38 </buildSpec>
39 <natures>
40 <nature>com.springsource.sts.roo.core.nature</nature>
41 <nature>org.springframework.ide.eclipse.core.springnature</nature>
42 <nature>org.eclipse.ajdt.ui.ajnature</nature>
43 <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
44 <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
45 <nature>org.eclipse.jdt.core.javanature</nature>
46 <nature>org.eclipse.m2e.core.maven2Nature</nature>
47 <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
48 <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
49 </natures>
50 </projectDescription>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <classpath>
3 <classpathentry kind="src" path="src/main/webapp"/>
4 <classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
5 <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
6 <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
7 <attributes>
8 <attribute name="hide" value="true"/>
9 </attributes>
10 </classpathentry>
11 <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
12 <classpathentry kind="output" path=""/>
13 </classpath>
1 eclipse.preferences.version=1
2 org.aspectj.ajdt.core.compiler.BuildOptions.showweavemessages=false
3 org.aspectj.ajdt.core.compiler.lint.BrokeSerialVersionCompatibility=ignore
4 org.aspectj.ajdt.core.compiler.lint.CannotImplementLazyTJP=ignore
5 org.aspectj.ajdt.core.compiler.lint.InvalidAbsoluteTypeName=warning
6 org.aspectj.ajdt.core.compiler.lint.NeedSerialVersionUIDField=ignore
7 org.aspectj.ajdt.core.compiler.lint.NoInterfaceCtorJoinpoint=warning
8 org.aspectj.ajdt.core.compiler.lint.ShadowNotInStructure=ignore
9 org.aspectj.ajdt.core.compiler.lint.TypeNotExposedToWeaver=warning
10 org.aspectj.ajdt.core.compiler.lint.UnresolvableMember=warning
11 org.aspectj.ajdt.core.compiler.lint.WildcardTypeName=ignore
12 org.aspectj.ajdt.core.compiler.lint.adviceDidNotMatch=warning
13 org.aspectj.ajdt.core.compiler.lint.annotationAsTargetForDecpIgnored=warning
14 org.aspectj.ajdt.core.compiler.lint.calculatingSerialVersionUID=ignore
15 org.aspectj.ajdt.core.compiler.lint.cantFindType=error
16 org.aspectj.ajdt.core.compiler.lint.cantFindTypeAffectingJPMatch=warning
17 org.aspectj.ajdt.core.compiler.lint.cantMatchArrayTypeOnVarargs=ignore
18 org.aspectj.ajdt.core.compiler.lint.elementAlreadyAnnotated=warning
19 org.aspectj.ajdt.core.compiler.lint.enumAsTargetForDecpIgnored=warning
20 org.aspectj.ajdt.core.compiler.lint.invalidTargetForAnnotation=warning
21 org.aspectj.ajdt.core.compiler.lint.multipleAdviceStoppingLazyTjp=ignore
22 org.aspectj.ajdt.core.compiler.lint.noExplicitConstructorCall=warning
23 org.aspectj.ajdt.core.compiler.lint.noGuardForLazyTjp=ignore
24 org.aspectj.ajdt.core.compiler.lint.noJoinpointsForBridgeMethods=warning
25 org.aspectj.ajdt.core.compiler.lint.runtimeExceptionNotSoftened=warning
26 org.aspectj.ajdt.core.compiler.lint.swallowedExceptionInCatchBlock=ignore
27 org.aspectj.ajdt.core.compiler.lint.uncheckedAdviceConversion=warning
28 org.aspectj.ajdt.core.compiler.lint.uncheckedArgument=warning
29 org.aspectj.ajdt.core.compiler.lint.unmatchedTargetKind=warning
30 org.aspectj.ajdt.core.compiler.lint.unorderedAdviceAtShadow=ignore
31 org.aspectj.ajdt.core.compiler.list.UnmatchedSuperTypeInCall=warning
32 org.aspectj.ajdt.core.compiler.weaver.XHasMember=false
33 org.aspectj.ajdt.core.compiler.weaver.XNoInline=false
34 org.aspectj.ajdt.core.compiler.weaver.XNotReweavable=false
35 org.aspectj.ajdt.core.compiler.weaver.XSerializableAspects=false
36 org.aspectj.ajdt.core.compiler.weaver.outxml=true
37 org.aspectj.ajdt.core.compiler.weaver.timers=false
38 org.aspectj.ajdt.core.compiler.weaver.verbose=false
39 org.aspectj.ajdt.core.complier.lint.aspectExcludedByConfiguration=ignore
40 org.eclipse.ajdt.core.builder.incrementalCompilationOptimizations=true
41 org.eclipse.ajdt.core.compiler.nonStandardOptions=
42 org.eclipse.ajdt.core.compiler.useProjectSettings=true
1 eclipse.preferences.version=1
2 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 org.eclipse.jdt.core.compiler.compliance=1.6
5 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
8 org.eclipse.jdt.core.compiler.source=1.6
1 activeProfiles=
2 eclipse.preferences.version=1
3 resolveWorkspaceProjects=true
4 version=1
1 <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
2 <wb-module deploy-name="DevTools">
3 <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
4 <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
5 <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
6 <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
7 <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
8 <property name="context-root" value="DevTools"/>
9 <property name="java-output-path" value="/DevTools/target/classes"/>
10 </wb-module>
11 </project-modules>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <faceted-project>
3 <fixed facet="wst.jsdt.web"/>
4 <installed facet="java" version="1.5"/>
5 <installed facet="jst.web" version="2.3"/>
6 <installed facet="wst.jsdt.web" version="1.0"/>
7 </faceted-project>
1 org.eclipse.wst.jsdt.launching.baseBrowserLibrary
...\ No newline at end of file ...\ No newline at end of file
1 Window
...\ No newline at end of file ...\ No newline at end of file
1 disabled=06target
2 eclipse.preferences.version=1
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.emercit</groupId>
6 <artifactId>DevTools</artifactId>
7 <packaging>war</packaging>
8 <version>1.0.0-BUILD-SNAPSHOT</version>
9 <properties>
10 <java-version>1.6</java-version>
11 <org.springframework-version>3.0.5.RELEASE</org.springframework-version>
12 <org.springframework.roo-version>1.0.2.RELEASE</org.springframework.roo-version>
13 <org.aspectj-version>1.6.9</org.aspectj-version>
14 <org.slf4j-version>1.5.10</org.slf4j-version>
15 </properties>
16 <dependencies>
17 <!-- Spring -->
18
19 <dependency>
20 <groupId>javassist</groupId>
21 <artifactId>javassist</artifactId>
22 <version>3.12.1.GA</version>
23 </dependency>
24
25 <dependency>
26 <groupId>org.snmp4j</groupId>
27 <artifactId>snmp4j-agent</artifactId>
28 <version>1.3.1</version>
29 </dependency>
30
31
32 <dependency>
33 <groupId>org.codehaus.jackson</groupId>
34 <artifactId>jackson-mapper-asl</artifactId>
35 <version>1.9.12</version>
36 </dependency>
37
38 <dependency>
39 <groupId>org.springframework</groupId>
40 <artifactId>spring-context</artifactId>
41 <version>${org.springframework-version}</version>
42 <exclusions>
43 <!-- Exclude Commons Logging in favor of SLF4j -->
44 <exclusion>
45 <groupId>commons-logging</groupId>
46 <artifactId>commons-logging</artifactId>
47 </exclusion>
48 </exclusions>
49 </dependency>
50 <dependency>
51 <groupId>org.springframework</groupId>
52 <artifactId>spring-webmvc</artifactId>
53 <version>${org.springframework-version}</version>
54 </dependency>
55
56 <dependency>
57 <groupId>org.springframework.security</groupId>
58 <artifactId>spring-security-web</artifactId>
59 <version>${org.springframework-version}</version>
60 </dependency>
61 <dependency>
62 <groupId>org.springframework.security</groupId>
63 <artifactId>spring-security-config</artifactId>
64 <version>${org.springframework-version}</version>
65 </dependency>
66 <dependency>
67 <groupId>org.springframework.security</groupId>
68 <artifactId>spring-security-core</artifactId>
69 <version>${org.springframework-version}</version>
70 </dependency>
71
72
73 <dependency>
74 <groupId>javax.persistence</groupId>
75 <artifactId>persistence-api</artifactId>
76 <version>1.0</version>
77 </dependency>
78 <dependency>
79 <groupId>org.hibernate</groupId>
80 <artifactId>hibernate-core</artifactId>
81 <version>3.3.2.GA</version>
82 </dependency>
83 <dependency>
84 <groupId>org.hibernate</groupId>
85 <artifactId>hibernate-annotations</artifactId>
86 <version>3.3.1.GA</version>
87 </dependency>
88 <dependency>
89 <groupId>org.hibernate</groupId>
90 <artifactId>hibernate-commons-annotations</artifactId>
91 <version>3.3.0.ga</version>
92 </dependency>
93 <dependency>
94 <groupId>org.springframework</groupId>
95 <artifactId>spring-tx</artifactId>
96 <version>${org.springframework-version}</version>
97 </dependency>
98
99 <dependency>
100 <groupId>org.springframework</groupId>
101 <artifactId>spring-orm</artifactId>
102 <version>${org.springframework-version}</version>
103 </dependency>
104 <dependency>
105 <groupId>mysql</groupId>
106 <artifactId>mysql-connector-java</artifactId>
107 <version>5.1.6</version>
108 </dependency>
109
110 <!-- Roo dependencies -->
111 <dependency>
112 <groupId>org.springframework.roo</groupId>
113 <artifactId>org.springframework.roo.annotations</artifactId>
114 <version>${org.springframework.roo-version}</version>
115 <scope>provided</scope>
116 </dependency>
117
118 <!-- AspectJ -->
119 <dependency>
120 <groupId>org.aspectj</groupId>
121 <artifactId>aspectjrt</artifactId>
122 <version>${org.aspectj-version}</version>
123 </dependency>
124
125 <!-- Logging -->
126 <dependency>
127 <groupId>org.slf4j</groupId>
128 <artifactId>slf4j-api</artifactId>
129 <version>${org.slf4j-version}</version>
130 </dependency>
131 <dependency>
132 <groupId>org.slf4j</groupId>
133 <artifactId>jcl-over-slf4j</artifactId>
134 <version>${org.slf4j-version}</version>
135 <scope>runtime</scope>
136 </dependency>
137 <dependency>
138 <groupId>org.slf4j</groupId>
139 <artifactId>slf4j-log4j12</artifactId>
140 <version>${org.slf4j-version}</version>
141 <scope>runtime</scope>
142 </dependency>
143 <dependency>
144 <groupId>log4j</groupId>
145 <artifactId>log4j</artifactId>
146 <version>1.2.15</version>
147 <exclusions>
148 <exclusion>
149 <groupId>javax.mail</groupId>
150 <artifactId>mail</artifactId>
151 </exclusion>
152 <exclusion>
153 <groupId>javax.jms</groupId>
154 <artifactId>jms</artifactId>
155 </exclusion>
156 <exclusion>
157 <groupId>com.sun.jdmk</groupId>
158 <artifactId>jmxtools</artifactId>
159 </exclusion>
160 <exclusion>
161 <groupId>com.sun.jmx</groupId>
162 <artifactId>jmxri</artifactId>
163 </exclusion>
164 </exclusions>
165 <scope>runtime</scope>
166 </dependency>
167
168 <!-- @Inject -->
169 <dependency>
170 <groupId>javax.inject</groupId>
171 <artifactId>javax.inject</artifactId>
172 <version>1</version>
173 </dependency>
174
175 <!-- Servlet -->
176 <dependency>
177 <groupId>javax.servlet</groupId>
178 <artifactId>servlet-api</artifactId>
179 <version>2.5</version>
180 <scope>provided</scope>
181 </dependency>
182 <dependency>
183 <groupId>javax.servlet.jsp</groupId>
184 <artifactId>jsp-api</artifactId>
185 <version>2.1</version>
186 <scope>provided</scope>
187 </dependency>
188 <dependency>
189 <groupId>javax.servlet</groupId>
190 <artifactId>jstl</artifactId>
191 <version>1.2</version>
192 </dependency>
193
194 <!-- Test -->
195 <dependency>
196 <groupId>junit</groupId>
197 <artifactId>junit</artifactId>
198 <version>4.7</version>
199 <scope>test</scope>
200 </dependency>
201 <!--
202 <dependency>
203 <groupId>org.smslib</groupId>
204 <artifactId>smslib</artifactId>
205 <version>dev-SNAPSHOT</version>
206 </dependency>
207 -->
208 </dependencies>
209 <repositories>
210 <!-- For testing against latest Spring snapshots -->
211 <repository>
212 <id>org.springframework.maven.snapshot</id>
213 <name>Spring Maven Snapshot Repository</name>
214 <url>http://maven.springframework.org/snapshot</url>
215 <releases>
216 <enabled>false</enabled>
217 </releases>
218 <snapshots>
219 <enabled>true</enabled>
220 </snapshots>
221 </repository>
222 <!-- For developing against latest Spring milestones -->
223 <repository>
224 <id>org.springframework.maven.milestone</id>
225 <name>Spring Maven Milestone Repository</name>
226 <url>http://maven.springframework.org/milestone</url>
227 <snapshots>
228 <enabled>false</enabled>
229 </snapshots>
230 </repository>
231
232 <!--
233 <repository>
234 <id>smslib-snapshots</id>
235 <name>SMSLib Repository</name>
236 <url>http://smslib.org/maven2/snapshots/</url>
237 </repository>
238 -->
239
240 </repositories>
241 <build>
242 <plugins>
243 <plugin>
244 <groupId>org.apache.maven.plugins</groupId>
245 <artifactId>maven-compiler-plugin</artifactId>
246 <configuration>
247 <source>${java-version}</source>
248 <target>${java-version}</target>
249 </configuration>
250 </plugin>
251 <plugin>
252 <groupId>org.apache.maven.plugins</groupId>
253 <artifactId>maven-war-plugin</artifactId>
254 <configuration>
255 <warName>DevTools</warName>
256 </configuration>
257 </plugin>
258 <plugin>
259 <groupId>org.apache.maven.plugins</groupId>
260 <artifactId>maven-dependency-plugin</artifactId>
261 <executions>
262 <execution>
263 <id>install</id>
264 <phase>install</phase>
265 <goals>
266 <goal>sources</goal>
267 </goals>
268 </execution>
269 </executions>
270 </plugin>
271 <plugin>
272 <groupId>org.codehaus.mojo</groupId>
273 <artifactId>aspectj-maven-plugin</artifactId>
274 <!-- Have to use version 1.2 since version 1.3 does not appear to work
275 with ITDs -->
276 <version>1.2</version>
277 <dependencies>
278 <!-- You must use Maven 2.0.9 or above or these are ignored (see MNG-2972) -->
279 <dependency>
280 <groupId>org.aspectj</groupId>
281 <artifactId>aspectjrt</artifactId>
282 <version>${org.aspectj-version}</version>
283 </dependency>
284 <dependency>
285 <groupId>org.aspectj</groupId>
286 <artifactId>aspectjtools</artifactId>
287 <version>${org.aspectj-version}</version>
288 </dependency>
289 </dependencies>
290 <executions>
291 <execution>
292 <goals>
293 <goal>compile</goal>
294 <goal>test-compile</goal>
295 </goals>
296 </execution>
297 </executions>
298 <configuration>
299 <outxml>true</outxml>
300 <source>${java-version}</source>
301 <target>${java-version}</target>
302 </configuration>
303 </plugin>
304 <plugin>
305 <groupId>org.apache.maven.plugins</groupId>
306 <artifactId>maven-surefire-plugin</artifactId>
307 <configuration>
308 <junitArtifactName>junit:junit</junitArtifactName>
309 <excludes>
310 <exclude>**/*_Roo_*</exclude>
311 </excludes>
312 </configuration>
313 </plugin>
314 <plugin>
315 <groupId>org.codehaus.mojo</groupId>
316 <artifactId>tomcat-maven-plugin</artifactId>
317 <version>1.0-beta-1</version>
318 </plugin>
319 </plugins>
320 </build>
321
322 <name>DevTools</name>
323 </project>
...\ No newline at end of file ...\ No newline at end of file
1 package org.emercit.app;
2
3 import java.util.Locale;
4
5 import org.slf4j.Logger;
6 import org.slf4j.LoggerFactory;
7
8 import org.springframework.web.bind.annotation.RequestMapping;
9 import org.springframework.web.bind.annotation.RequestMethod;
10 import org.springframework.beans.factory.annotation.Autowired;
11
12
13 import javax.servlet.http.*;
14 import javax.servlet.ServletContext;
15 import java.io.*;
16
17
18
19 import org.springframework.stereotype.Controller;
20 import org.springframework.validation.BindingResult;
21 import org.springframework.web.bind.annotation.ModelAttribute;
22 import org.springframework.web.bind.annotation.RequestMapping;
23 import org.springframework.web.bind.annotation.RequestMethod;
24 import org.springframework.web.bind.annotation.RequestParam;
25
26 @Controller
27 public class HomeController {
28
29
30 @RequestMapping("/")
31 public String home() {
32
33 return "home";
34
35 }
36
37 }
38
39
40
41
42
1 package org.emercit.app;
2
3 import java.util.Locale;
4
5 import org.slf4j.Logger;
6 import org.slf4j.LoggerFactory;
7
8 import org.springframework.web.bind.annotation.RequestMapping;
9 import org.springframework.web.bind.annotation.RequestMethod;
10 import org.springframework.beans.factory.annotation.Autowired;
11
12
13 import javax.servlet.http.*;
14 import javax.servlet.ServletContext;
15 import java.io.*;
16
17 import org.springframework.stereotype.Controller;
18 import org.springframework.validation.BindingResult;
19 import org.springframework.web.bind.annotation.ModelAttribute;
20 import org.springframework.web.bind.annotation.RequestMapping;
21 import org.springframework.web.bind.annotation.RequestMethod;
22 import org.springframework.web.bind.annotation.RequestParam;
23
24 import org.springframework.stereotype.Controller;
25 import org.springframework.web.bind.annotation.RequestMapping;
26 import org.springframework.web.bind.annotation.RequestMethod;
27 import org.springframework.web.bind.annotation.ResponseBody;
28
29 import org.springframework.web.bind.annotation.RequestBody;
30
31 /**
32 * Handles requests for the application home page.
33 */
34 @Controller
35 @RequestMapping("api")
36 public class MainConfigController {
37
38 /*
39 @RequestMapping(value = "mainconfig/get", method = RequestMethod.GET)
40 public @ResponseBody MainConfig get() {
41
42 try {
43 //return MainConfigService.get();
44 }
45 catch(Exception e)
46 {
47 return null;
48 }
49 }
50
51 */
52 /*
53 @RequestMapping(value="mainconfig/update" , method = RequestMethod.POST)
54 public @ResponseBody boolean update(@RequestBody MainConfig mainconfig) {
55
56 try {
57 //MainConfigService.Update(mainconfig);
58 return true;
59 }
60 catch(Exception e) {
61 return false;
62 }
63 }
64 */
65
66 }
1 package org.emercit.app;
2
3
4 import java.util.Locale;
5
6 import org.slf4j.Logger;
7 import org.slf4j.LoggerFactory;
8 import org.springframework.web.bind.annotation.RequestMapping;
9 import org.springframework.web.bind.annotation.RequestMethod;
10 import org.springframework.beans.factory.annotation.Autowired;
11
12 import javax.servlet.http.*;
13 import javax.servlet.ServletContext;
14
15 import java.io.*;
16
17 import org.springframework.stereotype.Controller;
18 import org.springframework.validation.BindingResult;
19 import org.springframework.web.bind.annotation.ModelAttribute;
20 import org.springframework.web.bind.annotation.PathVariable;
21 import org.springframework.web.bind.annotation.RequestMapping;
22 import org.springframework.web.bind.annotation.RequestMethod;
23 import org.springframework.web.bind.annotation.RequestParam;
24 import org.springframework.stereotype.Controller;
25 import org.springframework.web.bind.annotation.RequestMapping;
26 import org.springframework.web.bind.annotation.RequestMethod;
27 import org.springframework.web.bind.annotation.ResponseBody;
28 import org.springframework.web.bind.annotation.RequestBody;
29
30 import java.util.Vector;
31
32 import org.emercit.service.NetService;
33
34
35 import org.emercit.model.NetBean;
36 import org.emercit.model.DnsBean;
37 import org.emercit.model.EthBean;
38 import org.emercit.model.ProxyBean;
39
40
41 @Controller
42 @RequestMapping("api")
43 public class NetworkController {
44
45 /*
46 *
47 */
48 @RequestMapping(value = "net/alleth", method = RequestMethod.GET)
49 public @ResponseBody Vector<EthBean> getAllEth() {
50
51 try {
52 return NetService.INSTANCE.getAllEth();
53 }
54 catch(Exception e)
55 {
56 return null;
57 }
58 }
59
60
61 @RequestMapping(value = "net/dns", method = RequestMethod.GET)
62 public @ResponseBody Vector<DnsBean> getAllDns() {
63
64 try {
65 return NetService.INSTANCE.getDns();
66 }
67 catch(Exception e)
68 {
69 return null;
70 }
71 }
72
73
74 @RequestMapping(value = "net/proxy", method = RequestMethod.GET)
75 public @ResponseBody Vector<ProxyBean> getAllProxy() {
76
77 try {
78 return NetService.INSTANCE.getProxy();
79 }
80 catch(Exception e)
81 {
82 return null;
83 }
84 }
85
86
87
88
89
90
91
92 /*
93 export http_proxy='http://user:password@prox-server:3128'
94 export https_proxy='http://user:password@prox-server:3128'
95 export ftp_proxy='http://user:password@prox-server:3128'
96
97 */
98
99
100 /*
101 *
102 */
103
104 @RequestMapping(value = "net/byeth/{eth}", method = RequestMethod.GET)
105 public @ResponseBody NetBean getEth(@PathVariable String eth) {
106
107 try {
108 return NetService.INSTANCE.get(eth);
109 }
110 catch(Exception e) {
111
112 }
113 return null;
114 }
115
116
117
118
119
120 }
121
122
123 /*
124 @RequestMapping(value="mainconfig/update" , method = RequestMethod.POST)
125 public @ResponseBody boolean update(@RequestBody MainConfig mainconfig) {
126
127 try {
128 //MainConfigService.Update(mainconfig);
129 return true;
130 }
131 catch(Exception e) {
132 return false;
133 }
134 }
135 */
136
137
1 package org.emercit.app;
2
3 public class UtilController {
4
5 }
1 package org.emercit.model;
2
3
4 import java.io.Serializable;
5 import java.util.Vector;
6
7 public class DnsBean implements Serializable {
8
9
10 private int id;
11
12 private String dns;
13
14 public DnsBean() {
15
16 }
17
18 public int getId() {
19 return id;
20 }
21
22 public void setId(int id) {
23 this.id=id;
24 }
25
26 public String getDns() {
27 return dns;
28 }
29
30 public void setDns(String value) {
31 this.dns=value;
32 }
33 }
34
1 package org.emercit.model;
2
3
4 import java.io.Serializable;
5 import java.util.Vector;
6
7 public class EthBean implements Serializable {
8
9
10 private int id;
11
12 private String eth;
13
14 public EthBean() {
15
16 }
17
18 public int getId() {
19 return id;
20 }
21
22 public void setId(int id) {
23 this.id=id;
24 }
25
26 public String getEth() {
27 return eth;
28 }
29
30 public void setEth(String value) {
31 this.eth=value;
32 }
33 }
34
35
36
37
38
39
40
1 package org.emercit.model;
2
3
4 import java.util.regex.Matcher;
5 import java.util.regex.Pattern;
6
7 public class IPAddressValidator {
8
9
10 private Pattern pattern;
11 private Matcher matcher;
12
13 private static final String IPADDRESS_PATTERN =
14 "^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
15 "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
16 "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
17 "([01]?\\d\\d?|2[0-4]\\d|25[0-5])$";
18
19 public IPAddressValidator(){
20 pattern = Pattern.compile(IPADDRESS_PATTERN);
21 }
22
23 /**
24 * Validate ip address with regular expression
25 * @param ip ip address for validation
26 * @return true valid ip address, false invalid ip address
27 */
28 public boolean validate(final String ip){
29 matcher = pattern.matcher(ip);
30 return matcher.matches();
31 }
32
33
34
35 }
36
37
38
39
1 package org.emercit.model;
2
3 import java.io.Serializable;
4 import java.util.Vector;
5
6 public class NetBean implements Serializable {
7
8 private static final long serialVersionUID = 1L;
9
10 private String ethname;
11
12 private String mac;
13
14 private boolean dhcp;
15
16 private String ip;
17
18 private String netmask;
19
20 private String gateway;
21
22 private String broadcast;
23
24 private Vector<String> extinfo;
25
26
27 public NetBean() {
28
29 }
30
31 public String getEthName() {
32 return ethname;
33 }
34
35 public void setEthName(String value) {
36 ethname=value;
37 }
38
39 public String getMac() {
40 return mac;
41 }
42
43
44 public void setMac(String value) {
45 this.mac=value;
46 }
47
48 public boolean getUseDhcp() {
49 return dhcp;
50 }
51
52 public void setUseDhcp(boolean value) {
53 this.dhcp = value;
54 }
55
56 public String getIp() {
57 return ip;
58 }
59
60 public void setIp(String value) {
61 this.ip = value;
62 }
63
64 public String getNetmask() {
65 return netmask;
66 }
67
68 public void setNetmask(String value) {
69 this.netmask=value;
70 }
71
72 public String getGateway() {
73 return gateway;
74 }
75
76 public void setGateway(String value) {
77 this.gateway=value;
78 }
79
80 public String getBroadcast() {
81 return broadcast;
82 }
83
84 public void setBroadcast(String value) {
85 this.broadcast=value;
86 }
87
88 public Vector<String> getExtInfo() {
89 return extinfo;
90 }
91
92 public void setExtInfo(Vector<String> value) {
93 this.extinfo=value;
94 }
95
96
97
98
99
100 }
101
102
103
104
105
106
107
1 package org.emercit.model;
2
3 import java.io.Serializable;
4 import java.util.Vector;
5
6 public class ProxyBean implements Serializable {
7
8 private int id;
9
10 private String proxy;
11
12 public ProxyBean() {
13
14 }
15
16 public int getId() {
17 return id;
18 }
19
20
21 public void setId(int id) {
22 this.id=id;
23 }
24
25
26 public String getProxy() {
27 return proxy;
28 }
29
30
31 public void setProxy(String value) {
32 this.proxy=value;
33 }
34
35 }
36
37
38
39
40
1 package org.emercit.model;
2
3 public class StrCmd {
4
5
6
7
8 }
1 package org.emercit.service;
2
3
4 import java.io.BufferedReader;
5 import java.io.InputStreamReader;
6 import java.util.List;
7 import java.util.ArrayList;
8 import java.util.Random;
9
10 import java.util.Vector;
11
12
13
14 public class CommandExecutor {
15
16
17 public Vector<String> Run(String cmd) throws Exception {
18
19 Vector<String> v=new Vector<String>();
20
21 Runtime run = Runtime.getRuntime();
22
23 Process proc = run.exec(new String[]{"/bin/sh", "-c",cmd});
24 proc.waitFor();
25 BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
26 while(br.ready()) {
27 v.add(br.readLine());
28 }
29
30 return v;
31 }
32
33
34 }
1 package org.emercit.service;
2
3
4 import org.emercit.model.NetBean;
5 import org.emercit.model.EthBean;
6 import org.emercit.model.DnsBean;
7 import org.emercit.model.ProxyBean;
8
9
10
11
12 import org.emercit.model.IPAddressValidator;
13
14 import java.util.Vector;
15
16 public enum NetService {
17
18 INSTANCE;
19
20 private IPAddressValidator ipvalidator=new IPAddressValidator();
21
22 private CommandExecutor ce=new CommandExecutor();
23
24 private NetBean nb=new NetBean();
25
26
27
28 private final String urlZabixAgent="zabbix_get -s 127.0.0.1 -p 10050 -k";
29
30
31 public NetBean get(String eth) throws Exception {
32
33 nb.setEthName(eth);
34
35 String strUseDhcp=ce.Run(urlZabixAgent+" 'custom.utils.net.eth.usedhcp['"+eth+"'"+"]'").get(1);
36
37 if (!strUseDhcp.equals("dhcp")) {
38 nb.setUseDhcp(false);
39 // Получение шлюза из файла /etc/networ/interfaces
40 nb.setGateway(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.gwstatic[]'").firstElement());
41
42 nb.setMac(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.mac["+eth+"]'").firstElement());
43 nb.setIp(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.addrstatic[]'").firstElement());
44 nb.setBroadcast(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.bcaststatic[]'").firstElement());
45 nb.setNetmask(ce.Run(urlZabixAgent+ " 'custom.utils.net.eth.netmaskstatic[]'").firstElement());
46
47
48 }else {
49 nb.setUseDhcp(true);
50 // Получение шлюза по умолчанию
51 nb.setGateway(ce.Run(urlZabixAgent+" 'custom.utils.net.gwdefault[]'").firstElement());
52
53 nb.setMac(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.mac["+eth+"]'").firstElement());
54 nb.setIp(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.inetaddr["+eth+"]'").firstElement());
55 nb.setBroadcast(ce.Run(urlZabixAgent+" 'custom.utils.net.eth.bcast["+eth+"]'").firstElement());
56 nb.setNetmask(ce.Run(urlZabixAgent+ " 'custom.utils.net.eth.mask["+eth+"]'").firstElement());
57 }
58
59
60 // ExtInfo
61 Vector<String> buff=ce.Run(urlZabixAgent+ " 'custom.utils.net.extinfo["+eth+"]'");
62
63 buff.remove(0);
64 buff.remove(0);
65
66 for (int i=0;i<buff.size();i++) {
67
68 String v=buff.get(i).trim();
69
70 buff.remove(i);
71 buff.insertElementAt(v, i);
72 }
73
74
75 nb.setExtInfo(buff);
76
77
78 return nb;
79 }
80
81 public Vector<String> set(NetBean m) throws Exception{
82
83 Vector<String> result=new Vector<String>();
84
85
86 if (!ipvalidator.validate(m.getIp())) {
87 new Exception(m.getIp()+"- неверный формат");
88 }
89
90 if (!ipvalidator.validate(m.getNetmask())) {
91 new Exception(m.getNetmask()+"- неверный формат");
92 }
93
94 if (!ipvalidator.validate(m.getGateway())) {
95 new Exception(m.getGateway()+"- неверный формат");
96 }
97
98 if (m.getUseDhcp()) {
99
100 ce.Run("");
101
102 }else {
103
104
105 ce.Run("");
106
107 }
108
109
110
111 this.nb=m;
112
113
114
115 return result;
116 }
117
118
119 public Vector<EthBean> getAllEth() throws Exception {
120
121 Vector<EthBean> result=new Vector<EthBean>();
122
123 Vector<String> v=ce.Run("zabbix_get -s 127.0.0.1 -p 10050 -k 'custom.utils.net.eths[]'");
124 int i=0;
125 for (String s:v) {
126
127 EthBean eb=new EthBean();
128 eb.setId(i);
129 eb.setEth(s);
130 result.add(eb);
131 i++;
132 }
133 return result;
134 }
135
136
137 public Vector<DnsBean> getDns() throws Exception {
138
139
140 Vector<DnsBean> result=new Vector<DnsBean>();
141
142 Vector<String> v=ce.Run("zabbix_get -s 127.0.0.1 -p 10050 -k 'custom.utils.net.dns[]'");
143 int i=0;
144 for (String s:v) {
145
146 DnsBean db=new DnsBean();
147 db.setId(i);
148 db.setDns(s);
149 result.add(db);
150 i++;
151 }
152 return result;
153
154
155 }
156
157
158 public Vector<ProxyBean> getProxy() throws Exception {
159
160
161 Vector<ProxyBean> result=new Vector<ProxyBean>();
162
163 Vector<String> v=ce.Run("zabbix_get -s 127.0.0.1 -p 10050 -k 'custom.utils.net.globalproxy[]'");
164 int i=0;
165 for (String s:v) {
166
167 ProxyBean db=new ProxyBean();
168 db.setId(i);
169 db.setProxy(s);
170 result.add(db);
171 i++;
172 }
173 return result;
174
175
176
177
178
179 }
180
181
182 }
1 package org.emercit.service;
2
3 public class UtilService {
4
5
6
7
8
9 }
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
3 <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
4
5 <!-- Appenders -->
6 <appender name="console" class="org.apache.log4j.ConsoleAppender">
7 <param name="Target" value="System.out" />
8 <layout class="org.apache.log4j.PatternLayout">
9 <param name="ConversionPattern" value="%-5p: %c - %m%n" />
10 </layout>
11 </appender>
12
13 <!-- Application Loggers -->
14 <logger name="org.emercit.app">
15 <level value="info" />
16 </logger>
17
18 <!-- 3rdparty Loggers -->
19 <logger name="org.springframework.core">
20 <level value="info" />
21 </logger>
22
23 <logger name="org.springframework.beans">
24 <level value="info" />
25 </logger>
26
27 <logger name="org.springframework.context">
28 <level value="info" />
29 </logger>
30
31 <logger name="org.springframework.web">
32 <level value="info" />
33 </logger>
34
35 <!-- Root Logger -->
36 <root>
37 <priority value="warn" />
38 <appender-ref ref="console" />
39 </root>
40
41 </log4j:configuration>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans:beans xmlns="http://www.springframework.org/schema/mvc"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xmlns:beans="http://www.springframework.org/schema/beans"
5 xmlns:context="http://www.springframework.org/schema/context"
6 xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
7 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
8 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
9
10 <!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
11
12 <!-- Enables the Spring MVC @Controller programming model -->
13 <annotation-driven />
14
15
16
17 <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
18 <resources mapping="/resources/**" location="/resources/" />
19
20 <!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
21 <beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
22 <beans:property name="prefix" value="/WEB-INF/views/" />
23 <beans:property name="suffix" value=".jsp" />
24 </beans:bean>
25
26 <context:component-scan base-package="org.emercit.app" />
27
28 <!-- Transporting JSON - Data -->
29 <beans:bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
30 <beans:property name="mediaTypes">
31 <beans:map>
32 <beans:entry key="json" value="application/json"/>
33 </beans:map>
34 </beans:property>
35 <beans:property name="defaultViews">
36 <beans:list>
37 <beans:bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
38 <beans:property name="prefixJson" value="true"/>
39 </beans:bean>
40 </beans:list>
41 </beans:property>
42 </beans:bean>
43
44 </beans:beans>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
5
6 </beans>
...\ No newline at end of file ...\ No newline at end of file
1
2 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
3
4
5 <html>
6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8 <title>Device Tools</title>
9
10 <script type="text/javascript" src="resources/js/extjs5.0.0/build/ext-all-debug.js"></script>
11 <script type="text/javascript" src="resources/js/extjs5.0.0/packages/ext-theme-crisp/build/ext-theme-crisp.js"></script>
12 <link rel="stylesheet" href="resources/js/extjs5.0.0/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all-debug.css" />
13 <script type="text/javascript" src="resources/js/app.js"></script>
14 <script src="resources/js/jquery.min.js"></script>
15 </head>
16 <body>
17
18
19
20 </body>
21 </html>
22
23
1 <?xml version="1.0" encoding="UTF-8"?>
2 <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
5
6 <!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
7 <context-param>
8 <param-name>contextConfigLocation</param-name>
9 <param-value>/WEB-INF/spring/root-context.xml</param-value>
10 </context-param>
11
12 <!-- Creates the Spring Container shared by all Servlets and Filters -->
13 <listener>
14 <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
15 </listener>
16
17 <!-- Processes application requests -->
18 <servlet>
19 <servlet-name>appServlet</servlet-name>
20 <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
21 <init-param>
22 <param-name>contextConfigLocation</param-name>
23 <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
24 </init-param>
25 <load-on-startup>1</load-on-startup>
26 </servlet>
27
28 <servlet-mapping>
29 <servlet-name>appServlet</servlet-name>
30 <url-pattern>/</url-pattern>
31 </servlet-mapping>
32
33
34
35
36
37 </web-app>
1 Ext.application({
2 name : 'App',
3 appFolder:"resources/js/app",
4 views : [
5 'MainConfig',
6 'NetworkSetting',
7 'PingUtil',
8 'Eth',
9 'Dns',
10 'Proxy',
11 'DetailDns',
12 'DetailProxy'
13
14 ],
15 controllers : [
16 'NetworkSetting',
17 'MainConfig',
18 'PingUtil'
19 ],
20
21 stores : [
22 'Eth',
23 'Dns',
24 'Proxy'
25
26 ],
27
28 launch : function() {
29
30 var record = new Object({
31 run: function () {
32 var ret = null;
33 $.ajax({
34 url: 'api/mainconfig/get',
35 beforeSend: function () {
36 },
37 async: false,
38 dataType: "json",
39 type: "GET",
40 success: function (data) {
41 ret=data;
42
43 }
44 });
45 return ret;
46 }
47 });
48
49 var data=record.run();
50
51
52 Ext.create('Ext.container.Viewport', {
53 layout: {
54 type: 'border'
55 },
56 defaults: {
57 split: true
58 },
59 items: [{
60 region: 'north',
61 height: 30,
62 id: 'mainHeader',
63 margins: '0 5 5 5',
64 bodyPadding: 5,
65 items:[{
66 html:'<h2>Параметры</h2>'
67 }]
68 },
69 {
70 region: 'south',
71 html: "",
72 height: 30,
73 margins: '0 5 5 5',
74 bodyPadding: 2,
75 id: 'mainFooter'
76 },
77 {
78 id: 'mainContent',
79 collapsible: false,
80 region: 'center',
81 //layout: 'fit',
82 border: true,
83 items:[
84 {
85 region: 'center',
86 xtype: 'tabpanel',
87 items: [
88
89
90 {
91 title: 'УСТРОЙСТВО',
92 items:[
93
94
95 {
96 region: 'center',
97 xtype: 'tabpanel',
98 items: [ {
99 title: 'Описание',
100 items:[{
101 xtype : 'mvvm-MainConfigView',
102 viewModel : {
103 data : {
104 rec : {
105 title:"",
106 guid:""
107 }
108 }
109 }
110
111 }]
112 },
113
114
115 {
116 title: 'Дата/время',
117 items:[]
118 }
119
120
121 ]
122 }
123
124
125 ]
126 },
127
128
129 {
130 title: 'СЕТЬ',
131 items:[{
132 region: 'center',
133 xtype: 'tabpanel',
134 items: [
135 {
136 title: 'Eth - интерфейсы',
137 items:[{
138 xtype : 'mvvm-EthView',
139 id:'cbxeth'
140 },
141 {
142 xtype : 'mvvm-NetworkSettingView',
143 id:'fromnetwork',
144 viewModel : {
145 data:{
146 broadcast: "",
147 ethName: "",
148 gateway: "",
149 ip: "",
150 mac: "",
151 netmask: "",
152 useDhcp: 0,
153 extInfo:[""]
154 }
155
156 }
157
158 }
159
160 ]
161 },
162
163 {
164 title: 'Dns',
165 items:[
166
167 {
168 xtype : 'mvvm-DnsView',
169 id:'grdDns'
170
171 }
172
173 ]
174 },
175
176 {
177 title: 'Proxy',
178 items:[{
179 xtype : 'mvvm-ProxyView',
180 id:'grdProxy'
181
182 }]
183 }]
184 }
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210 ]
211 },
212
213 {
214 title: 'УТИЛИТЫ',
215 items:[{
216 xtype : 'mvvm-PingUtilView',
217 viewModel : {
218 data : {
219 rec : {
220 host:"",
221 result:"",
222
223 }
224 }
225 }
226
227 }
228 ]
229 },
230
231
232 {
233 title: 'ПЕРЕМЕННЫЕ',
234 items:[
235
236 {
237 region: 'center',
238 xtype: 'tabpanel',
239 items: [
240 {
241 title: 'Аналоговые',
242 items:[]
243 },
244 {
245 title: 'Дискретные',
246 items:[]
247 },
248
249 {
250 title: 'Параметры устройства',
251 items:[]
252 }
253
254
255
256 ]
257
258 }
259
260
261
262
263
264
265 ]
266 },
267
268
269 {
270 title: 'СЕРВИСЫ',
271 items:[
272 {
273 region: 'center',
274 xtype: 'tabpanel',
275 items: [
276 {
277 title: 'SNMP Агент',
278 items:[
279
280
281
282 ]
283 },
284 {
285 title: 'SNMP Клиент',
286 items:[
287
288 ]
289 }
290 ]
291
292 }
293 ]
294 },
295
296
297
298 {
299 title: 'ФАЙЛОВЫЙ МЕНЕДЖЕР',
300 items:[
301 ]
302 },
303
304
305
306
307
308
309 {
310 title: 'ЛОГИ',
311 items:[{
312 region: 'center',
313 xtype: 'tabpanel',
314 items: [
315 {
316 title: 'Web Tools',
317 items:[
318
319
320
321 ]
322 },
323 {
324 title: 'SNMP Агент',
325 items:[
326
327
328
329 ]
330 },
331
332 {
333 title: 'SNMP Клиент',
334 items:[
335
336
337
338 ]
339 },
340
341 {
342 title: 'NTP',
343 items:[
344
345
346
347 ]
348 }
349
350 ]
351
352 }]
353 }
354
355
356
357
358
359
360 ]
361 }
362 ]
363 }]
364
365 });
366
367
368 }
369 });
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
1 Ext.define('App.controller.MainConfig', {
2 extend : 'Ext.app.Controller',
3
4 init : function() {
5
6
7 this.control({
8 'mvvm-MainConfigView > button#SaveRecord' : {
9 click : this.onSaveButtonClick
10 }
11 });
12 },
13
14 onSaveButtonClick : function(btn) {
15 //get reference to the form
16 var mainconfigView = btn.up('mvvm-MainConfigView');
17
18 //get the bound record
19 var record = mainconfigView.getViewModel().getData().rec;
20
21 if (record) {
22
23 var data=Ext.util.JSON.encode(record);
24
25
26
27 Ext.Ajax.request({
28 method: "POST",
29 url: 'api/mainconfig/update',
30 headers: {
31 'Accept': 'application/json',
32 'Content-Type': 'application/json'
33 },
34 params: data,
35 success: function(response, opts) {
36
37 var result = Ext.JSON.decode(response.responseText);
38
39 if(result) {
40 Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
41 //record.commit();
42 }
43 else
44 {
45 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
46 }
47
48
49 }, failure: function(response, opts) {
50 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
51 }
52 });
53
54 }
55 else {
56 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
57 }
58 }
59 });
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
1 Ext.define('App.controller.NetworkSetting', {
2 extend : 'Ext.app.Controller',
3
4 init : function() {
5
6 this.control({
7 'mvvm-NetworkSettingView > button#SaveRecord' : {
8 click : this.onSaveButtonClick
9 }
10 });
11
12
13 Ext.TaskManager.start({
14 run: this.ReloadData,
15 interval: 10000 ,
16 scope: this
17 });
18 },
19
20 ReloadData: function() {
21
22 var combo=Ext.getCmp('cbxeth');
23 if (typeof combo.getStore().lastOptions !== "undefined") {
24
25
26 var value = combo.getValue();
27 var valueField = combo.valueField;
28 var record;
29 combo.getStore().each(function(r){
30 if(r.data[valueField] == value){
31 record = r;
32 return false;
33 }
34 });
35 var eth=record ? record.get(combo.displayField) : null;
36
37
38 Ext.Ajax.request({
39 method: "GET",
40 url: 'api/net/byeth/'+eth,
41 headers: {
42 'Accept': 'application/json',
43 'Content-Type': 'application/json'
44 },
45
46 success: function(response, opts) {
47
48 var result = Ext.JSON.decode(response.responseText);
49 console.log(result);
50
51 //var detailFireSystemView = btn.up('mvvm-DetailFireSystemView');
52 //var record = detailFireSystemView.getViewModel().getData().rec;
53
54 Ext.getCmp('fromnetwork').viewModel.setData(result);
55 //Ext.getCmp('fromnetwork').viewModel.bind(result);
56 console.log(Ext.getCmp('fromnetwork').getViewModel().getData());
57
58
59 Ext.getCmp('ttt').setValue(result.extInfo);
60
61
62 var checkbox = Ext.getCmp('dhcp');
63
64
65 console.log("result.useDhcp:"+result.useDhcp);
66 if (result.useDhcp) {
67 checkbox.checked = true;
68 checkbox.addCls('x-form-cb-checked x-form-dirty');
69
70
71
72 Ext.getCmp('ip').setDisabled(true);
73 Ext.getCmp('netmask').setDisabled(true);
74 Ext.getCmp('gateway').setDisabled(true);
75 Ext.getCmp('broadcast').setDisabled(true);
76
77
78 }else {
79
80 checkbox.checked = false;
81 checkbox.removeCls('x-form-cb-checked x-form-dirty');
82
83
84 Ext.getCmp('ip').setDisabled(false);
85 Ext.getCmp('netmask').setDisabled(false);
86 Ext.getCmp('gateway').setDisabled(false);
87 Ext.getCmp('broadcast').setDisabled(false);
88
89 }
90
91 checkbox.checkChange();
92
93
94
95
96 Ext.getCmp('mac').setValue(result.mac);
97 Ext.getCmp('ip').setValue(result.ip);
98 Ext.getCmp('netmask').setValue(result.netmask);
99 Ext.getCmp('gateway').setValue(result.gateway);
100 Ext.getCmp('broadcast').setValue(result.broadcast);
101
102
103 Ext.getCmp('mac').setDisabled(true);
104
105 // me.viewModel.setData(record);
106 //if(result) {
107 // Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
108 //record.commit();
109 //}
110 //else
111 //{
112 // Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
113 //}
114 }, failure: function(response, opts) {
115 // Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
116 }
117 });
118
119 }
120 },
121
122 onSaveButtonClick : function(btn) {
123 //get reference to the form
124 var networksettingView = btn.up('mvvm-NetworkSettingView');
125
126 //get the bound record
127 var record = networksettingView.getViewModel().getData().rec;
128
129 if (record) {
130
131 var data=Ext.util.JSON.encode(record);
132
133 Ext.Ajax.request({
134 method: "POST",
135 url: 'api/mainconfig/update',
136 headers: {
137 'Accept': 'application/json',
138 'Content-Type': 'application/json'
139 },
140 params: data,
141 success: function(response, opts) {
142
143 var result = Ext.JSON.decode(response.responseText);
144
145 if(result) {
146 Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
147 //record.commit();
148 }
149 else
150 {
151 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
152 }
153
154 }, failure: function(response, opts) {
155 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
156 }
157 });
158
159 }
160 else {
161 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
162 }
163 }
164 });
165
166
167
168
169
170
171
172
173
174
175
176
1 Ext.define('App.controller.PingUtil', {
2 extend : 'Ext.app.Controller',
3
4 init : function() {
5
6 this.control({
7 'mvvm-PingUtilView > button#SaveRecord' : {
8 click : this.onSaveButtonClick
9 }
10 });
11 },
12 onSaveButtonClick : function(btn) {
13 //get reference to the form
14 var pingutilView = btn.up('mvvm-PingUtilView');
15
16 //get the bound record
17 var record = pingutilView.getViewModel().getData().rec;
18
19 if (record) {
20
21 var data=Ext.util.JSON.encode(record);
22
23
24
25 Ext.Ajax.request({
26 method: "POST",
27 url: 'api/mainconfig/update',
28 headers: {
29 'Accept': 'application/json',
30 'Content-Type': 'application/json'
31 },
32 params: data,
33 success: function(response, opts) {
34
35 var result = Ext.JSON.decode(response.responseText);
36
37 if(result) {
38 Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
39 //record.commit();
40 }
41 else
42 {
43 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
44 }
45
46
47 }, failure: function(response, opts) {
48 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
49 }
50 });
51
52 }
53 else {
54 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
55 }
56 }
57 });
...\ No newline at end of file ...\ No newline at end of file
1 Ext.define('App.model.Dns', {
2 extend : 'Ext.data.Model',
3
4 fields : [{
5 name:'id',
6 type:'int'
7 },
8 {
9 name:'dns',
10 type:'string'
11 }]
12 });
13
14
1 Ext.define('App.model.Eth', {
2 extend : 'Ext.data.Model',
3
4 fields : [
5 {
6 name : 'id',
7 type : 'int'
8 },
9 {
10 name : 'eth',
11 type : 'string'
12 }
13
14 ]
15 });
...\ No newline at end of file ...\ No newline at end of file
1 Ext.define('App.model.MainConfig', {
2 extend : 'Ext.data.Model',
3
4 fields : [
5 {
6 name : 'title',
7 type : 'string'
8 },
9 {
10 name : 'guid',
11 type : 'string'
12 }
13 ],
14
15 autoLoad: true,
16 autoSync: true,
17 // alias: 'store.devices',
18 proxy : {
19 type : 'ajax',
20 api: {
21
22 read: 'api/mainconfig/get'
23
24 },
25 reader : {
26 type : 'json'
27 }
28 }
29
30
31 });
...\ No newline at end of file ...\ No newline at end of file
1 Ext.define('App.model.NetworkSetting', {
2 extend : 'Ext.data.Model',
3
4 fields : [
5
6 {
7 name : 'mac',
8 type : 'string'
9 },
10
11 {
12 name : 'ethName',
13 type : 'string'
14 },
15
16 {
17 name : 'useDhcp',
18 type : 'boolean'
19 },
20 {
21 name : 'ip',
22 type : 'string'
23 },
24 {
25 name : 'gateway',
26 type : 'string'
27 },
28 {
29 name : 'netmask',
30 type : 'string'
31 },
32 {
33 name : 'broadcast',
34 type : 'string'
35 },
36
37 {
38 name : 'extInfo'
39 // type:'auto'
40 }
41
42
43
44
45
46
47 ],
48
49 autoLoad: true,
50 autoSync: true,
51 // alias: 'store.devices',
52 proxy : {
53 type : 'ajax',
54 api: {
55
56 read: 'api/mainconfig/get'
57
58 },
59 reader : {
60 type : 'json'
61 }
62 }
63
64
65 });
...\ No newline at end of file ...\ No newline at end of file
1 Ext.define('App.model.PingUtil', {
2 extend : 'Ext.data.Model',
3
4 fields : [
5 {
6 name : 'host',
7 type : 'string'
8 },
9 {
10 name : 'result',
11 type : 'string'
12 }
13 ],
14
15 autoLoad: true,
16 autoSync: true,
17 // alias: 'store.devices',
18 proxy : {
19 type : 'ajax',
20 api: {
21
22 read: 'api/mainconfig/get'
23
24 },
25 reader : {
26 type : 'json'
27 }
28 }
29
30
31 });
...\ No newline at end of file ...\ No newline at end of file
1 Ext.define('App.model.Proxy', {
2 extend : 'Ext.data.Model',
3
4 fields : [{
5 name:'id',
6 type:'int'
7 },
8 {
9 name:'proxy',
10 type:'string'
11 }]
12 });
...\ No newline at end of file ...\ No newline at end of file
1
2 Ext.define('App.store.Dns', {
3 extend : 'Ext.data.Store',
4
5 requires : [
6 'App.model.Dns'
7 ],
8
9 storeId : 'Dns',
10 model : 'App.model.Dns',
11
12 autoLoad: true,
13 autoSync: true,
14 alias: 'store.devices',
15 proxy : {
16 type : 'ajax',
17 api: {
18 read: 'api/net/dns'
19 },
20 reader : {
21 type : 'json',
22 idProperty : 'id'
23 }
24 }
25 });
...\ No newline at end of file ...\ No newline at end of file
1 Ext.define('App.store.Eth', {
2 extend : 'Ext.data.Store',
3
4 requires : [
5 'App.model.Eth'
6 ],
7
8 storeId : 'Eth',
9 model : 'App.model.Eth',
10
11 autoLoad: true,
12 autoSync: true,
13 // alias: 'store.devices',
14 proxy : {
15 type : 'ajax',
16 api: {
17
18 read: 'api/net/alleth'
19
20 },
21 reader : {
22 type : 'json',
23 idProperty : 'id'
24 }
25 }
26 });
...\ No newline at end of file ...\ No newline at end of file
1
2 Ext.define('App.store.Proxy', {
3 extend : 'Ext.data.Store',
4
5 requires : [
6 'App.model.Proxy'
7 ],
8
9 storeId : 'Proxy',
10 model : 'App.model.Proxy',
11 autoLoad: true,
12 autoSync: true,
13 alias: 'store.devices',
14 proxy : {
15 type : 'ajax',
16 api: {
17 read: 'api/net/proxy'
18 },
19 reader : {
20 type : 'json',
21 idProperty : 'id'
22 }
23 }
24 });
...\ No newline at end of file ...\ No newline at end of file
1 Ext.define('App.view.DetailDns', {
2 extend : 'Ext.form.Panel',
3 xtype : 'mvvm-DetailDnsView',
4
5 requires : [
6 'App.view.DetailDnsViewModel',
7 ],
8 height:115,
9 width:250,
10 frame : true,
11 padding : 10,
12
13 viewModel: {
14 type: 'detaildnsform'
15 },
16 items :[{
17 xtype:'fieldcontainer',
18 items:[{
19 xtype:'textfield',
20 bind:'{rec.dns}',
21 disable:true
22 }]
23 },
24 {
25 xtype : 'button',
26 text : 'Ок',
27 itemId : 'SaveRecord'
28 }]
29 });
...\ No newline at end of file ...\ No newline at end of file
1
2 Ext.define('App.view.DetailDnsViewModel', {
3 extend: 'Ext.app.ViewModel',
4 alias: 'viewmodel.detaildnsform',
5
6 data : {
7 rec : null
8 }
9 });
...\ No newline at end of file ...\ No newline at end of file
1 Ext.define('App.view.DetailProxy', {
2 extend : 'Ext.form.Panel',
3 xtype : 'mvvm-DetailProxyView',
4
5 requires : [
6 'App.view.DetailProxyViewModel',
7 ],
8 height:130,
9 width:400,
10 frame : true,
11 padding : 10,
12
13 viewModel: {
14 type: 'detailproxyform'
15 },
16 items :[{
17 xtype:'fieldcontainer',
18 items:[{
19 xtype:'textfield',
20 bind:'{rec.proxy}',
21 disable:true,
22 width:350,
23
24 }]
25 },
26 {
27 xtype : 'button',
28 text : 'Ок',
29 itemId : 'SaveRecord',
30 margin : '20 20 20 20'
31 }]
32 });
...\ No newline at end of file ...\ No newline at end of file
1
2 Ext.define('App.view.DetailProxyViewModel', {
3 extend: 'Ext.app.ViewModel',
4 alias: 'viewmodel.detailproxyform',
5
6 data : {
7 rec : null
8 }
9 });
...\ No newline at end of file ...\ No newline at end of file
1
2 Ext.define('App.view.Dns', {
3 extend : 'Ext.grid.Panel',
4 xtype : 'mvvm-DnsView',
5 title : 'DNS сервера',
6 store : 'Dns',
7
8 tbar: [
9 {
10 text:'Добавить',
11 handler: function(){
12
13 if (winadddns==null) {
14 var winadddns = Ext.create('widget.window', { // создание окна
15 title:'Добавить',
16
17 maximize: function(){
18 this.callParent([true]); //animate
19 },
20
21 restore: function(){
22 this.callParent([true]); //animate
23 },
24
25 closeAction: 'hide',
26 items: [
27 {
28 xtype : 'mvvm-DetailDnsView',
29 viewModel : {
30 data : {
31 rec : {
32 dns:'127.0.0.1'
33 }
34 }
35 }
36 }
37 ]
38 });
39
40 winadddns.show();
41 }
42
43
44
45 }
46 }] ,
47
48
49
50 columns: [{
51 text : '№',
52 dataIndex : 'id',
53 flex: 1
54 },
55 {
56 text : 'HOST',
57 dataIndex : 'dns',
58 flex : 5
59 },
60 {
61 xtype: 'actioncolumn',
62 text : '#',
63 flex:1,
64 dataIndex: 'guid',
65 items: [{
66 icon: 'resources/img/tools.png',
67 handler: function (grid, rowIndex, colIndex) {
68 var rec = grid.getStore().getAt(rowIndex);
69
70 if (wintoolsdns==null) {
71 var wintoolsdns = Ext.create('widget.window', { // создание окна
72 title:'Изменить',
73
74 maximize: function(){
75 this.callParent([true]); //animate
76 },
77
78 restore: function(){
79 this.callParent([true]); //animate
80 },
81
82 closeAction: 'hide',
83 items: [
84 {
85 xtype : 'mvvm-DetailDnsView',
86 viewModel : {
87 data : {
88 rec : rec
89 }
90 }
91 }
92 ]
93
94
95
96 });
97
98 wintoolsdns.show();
99 }
100 }
101 }
102 ],
103
104
105
106
107 action: 'tools'
108 },
109 ]
110 });
...\ No newline at end of file ...\ No newline at end of file
1
2
3
4 Ext.define('App.view.Eth', {
5 extend : 'Ext.form.field.ComboBox',
6 xtype : 'mvvm-EthView',
7 store : 'Eth',
8 fieldLabel: 'Eth',
9 valueField:'id',
10 displayField:'eth',
11 queryMode:'local',
12 margin:'5 5 5 5',
13 action:'cbxeth' ,
14 listeners:{
15 scope: this,
16
17
18 select: function(combo, records, eOpts) {
19 // console.log(records[0].get('eth'));
20
21 Ext.Ajax.request({
22 method: "GET",
23 url: 'api/net/byeth/'+records[0].get('eth'),
24 headers: {
25 'Accept': 'application/json',
26 'Content-Type': 'application/json'
27 },
28
29
30
31
32
33 success: function(response, opts) {
34
35 var result = Ext.JSON.decode(response.responseText);
36 console.log(result);
37
38 //var detailFireSystemView = btn.up('mvvm-DetailFireSystemView');
39 //var record = detailFireSystemView.getViewModel().getData().rec;
40
41 Ext.getCmp('fromnetwork').viewModel.setData(result);
42 //Ext.getCmp('fromnetwork').viewModel.bind(result);
43 console.log(Ext.getCmp('fromnetwork').getViewModel().getData());
44
45
46 Ext.getCmp('ttt').setValue(result.extInfo);
47
48
49 var checkbox = Ext.getCmp('dhcp');
50
51
52 console.log("result.useDhcp:"+result.useDhcp);
53 if (result.useDhcp) {
54 checkbox.checked = true;
55 checkbox.addCls('x-form-cb-checked x-form-dirty');
56
57
58
59 Ext.getCmp('ip').setDisabled(true);
60 Ext.getCmp('netmask').setDisabled(true);
61 Ext.getCmp('gateway').setDisabled(true);
62 Ext.getCmp('broadcast').setDisabled(true);
63
64
65 }else {
66
67 checkbox.checked = false;
68 checkbox.removeCls('x-form-cb-checked x-form-dirty');
69
70
71 Ext.getCmp('ip').setDisabled(false);
72 Ext.getCmp('netmask').setDisabled(false);
73 Ext.getCmp('gateway').setDisabled(false);
74 Ext.getCmp('broadcast').setDisabled(false);
75
76 }
77
78 checkbox.checkChange();
79
80
81
82
83 Ext.getCmp('mac').setValue(result.mac);
84 Ext.getCmp('ip').setValue(result.ip);
85 Ext.getCmp('netmask').setValue(result.netmask);
86 Ext.getCmp('gateway').setValue(result.gateway);
87 Ext.getCmp('broadcast').setValue(result.broadcast);
88
89
90 Ext.getCmp('mac').setDisabled(true);
91
92 // me.viewModel.setData(record);
93 //if(result) {
94 // Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
95 //record.commit();
96 //}
97 //else
98 //{
99 // Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
100 //}
101 }, failure: function(response, opts) {
102 // Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
103 }
104 });
105
106 },
107
108
109
110
111
112
113
114
115
116 /*
117 afterRender: function(combo) {
118
119 if (typeof combo.getStore().lastOptions !== "undefined") {
120
121 combo.setValue(combo.getStore().first().get(combo.valueField));
122
123 var value = combo.getValue();
124 var valueField = combo.valueField;
125 var record;
126 combo.getStore().each(function(r){
127 if(r.data[valueField] == value){
128 record = r;
129 return false;
130 }
131 });
132 var eth=record ? record.get(combo.displayField) : null;
133
134
135
136 Ext.Ajax.request({
137 method: "GET",
138 url: 'api/net/byeth/'+eth,
139 headers: {
140 'Accept': 'application/json',
141 'Content-Type': 'application/json'
142 },
143
144 success: function(response, opts) {
145
146 var result = Ext.JSON.decode(response.responseText);
147 console.log(result);
148
149 //var detailFireSystemView = btn.up('mvvm-DetailFireSystemView');
150 //var record = detailFireSystemView.getViewModel().getData().rec;
151
152 Ext.getCmp('fromnetwork').viewModel.setData(result);
153 //Ext.getCmp('fromnetwork').viewModel.bind(result);
154 console.log(Ext.getCmp('fromnetwork').getViewModel().getData());
155
156
157 Ext.getCmp('ttt').setValue(result.extInfo);
158
159 // me.viewModel.setData(record);
160 //if(result) {
161 // Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
162 //record.commit();
163 //}
164 //else
165 //{
166 // Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
167 //}
168
169
170 }, failure: function(response, opts) {
171 // Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
172 }
173 });
174
175
176 }
177 else {
178
179 combo.getStore().on("load", function(store, items){
180
181 combo.setValue(items[0].get(combo.valueField));
182
183 var value = combo.getValue();
184 console.log(value);
185
186 });
187 }
188 }*/
189 },
190
191
192
193 });
194
195
196
197
198
199
200
201
202
1 Ext.define('App.view.MainConfig', {
2 extend : 'Ext.form.Panel',
3 xtype : 'mvvm-MainConfigView',
4 requires : [
5 'App.view.MainConfigViewModel'
6 ],
7
8 frame : true,
9 padding : 10,
10
11 bind : {
12 // reference : 'App.model.MainConfig',
13 // title : '{rec.title}'
14 },
15
16 viewModel: {
17 type: 'mainconfigform' // references DetailViewModel
18 },
19
20 items : [
21
22 {
23 xtype : 'textfield',
24 bind : '{rec.guid}',
25 fieldLabel : 'GUID',
26 disable:true,
27 width:500,
28 margin:'5 5 10 3'
29 },
30 {
31 xtype : 'textarea',
32 bind : '{rec.title}',
33 fieldLabel : 'ОПИСАНИЕ',
34 height:50,
35 width:500,
36 margin:'5 5 10 3'
37 },
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 {
54 xtype : 'button',
55 text : 'Сохранить',
56 itemId : 'SaveRecord'
57 }
58
59 ]
60 });
...\ No newline at end of file ...\ No newline at end of file
1
2 Ext.define('App.view.MainConfigViewModel', {
3 extend: 'Ext.app.ViewModel',
4 alias: 'viewmodel.mainconfigform',
5
6 data : {
7 rec : null
8 }
9 });
...\ No newline at end of file ...\ No newline at end of file
1 Ext.define('App.view.NetworkSetting', {
2 extend : 'Ext.form.Panel',
3 xtype : 'mvvm-NetworkSettingView',
4 requires : [
5 'App.view.NetworkSettingViewModel'
6 ],
7
8 frame : false,
9 padding : 3,
10
11
12 items : [
13 {
14 xtype : 'checkboxfield',
15
16 fieldLabel : 'DHCP',
17 id:'dhcp',
18 inputValue: '1',
19 uncheckedValue: '0',
20 margin:'5 5 10 3'
21 },
22
23
24 {
25 xtype : 'textfield',
26 bind : '{mac}',
27 id:'mac',
28 fieldLabel : 'MAC',
29 margin:'5 5 10 3'
30
31 },
32
33
34 {
35 xtype : 'textfield',
36 bind : '{ip}',
37 fieldLabel : 'IP',
38 id:'ip',
39 margin:'5 5 10 3'
40
41
42 },
43 {
44 xtype : 'textfield',
45 bind : '{gateway}',
46 fieldLabel : 'GATEWAY',
47 id:'gateway',
48 margin:'5 5 10 3'
49
50
51 },
52 {
53 xtype : 'textfield',
54 bind : '{netmask}',
55 fieldLabel : 'NETMASK',
56 id:'netmask',
57 margin:'5 5 10 3'
58 },
59
60
61 {
62 xtype : 'textfield',
63 bind : '{broadcast}',
64 fieldLabel : 'BROADCAST',
65 id:'broadcast',
66 margin:'5 5 10 3',
67
68
69 },
70
71 {
72 xtype : 'textarea',
73 // bind : '{extInfo}',
74 id:'ttt',
75 fieldLabel : 'СТАТУС',
76 margin:'5 5 10 3',
77 allowBlank : false,
78
79 width:700,
80 height:100,
81
82 },
83
84
85 {
86 xtype : 'button',
87 text : 'ПРИМЕНИТЬ',
88 itemId : 'SaveRecord',
89 margin:'5 5 10 3'
90 }
91
92
93
94
95
96
97 ]
98 });
...\ No newline at end of file ...\ No newline at end of file
1
2 Ext.define('App.view.NetworkSettingViewModel', {
3 extend: 'Ext.app.ViewModel',
4 alias: 'viewmodel.networksettingform',
5
6 data : {
7
8 }
9 });
...\ No newline at end of file ...\ No newline at end of file
1 Ext.define('App.view.PingUtil', {
2 extend : 'Ext.form.Panel',
3 xtype : 'mvvm-PingUtilView',
4 requires : [
5 'App.view.PingUtilViewModel'
6 ],
7
8 frame : true,
9 padding : 10,
10
11 bind : {
12 // reference : 'App.model.MainConfig',
13 // title : '{rec.title}'
14 },
15
16 viewModel: {
17 type: 'pingutilform' // references DetailViewModel
18 },
19
20 items : [
21
22 {
23 xtype : 'textfield',
24 bind : '{rec.host}',
25 fieldLabel : 'HOST',
26 disable:true,
27 margin:'5 5 10 3'
28 },
29
30 {
31 xtype : 'button',
32 text : 'PING',
33 itemId : 'SaveRecord'
34 },
35 {
36
37 bind : '{rec.result}',
38 fieldLabel : 'РЕЗУЛЬТАТ',
39 margin:'5 5 10 3',
40 xtype : 'textareafield',
41 grow : true,
42 preventScrollbars: false,
43 width:700,
44 height:200
45 },
46
47
48
49 ]
50 });
...\ No newline at end of file ...\ No newline at end of file
1
2 Ext.define('App.view.PingUtilViewModel', {
3 extend: 'Ext.app.ViewModel',
4 alias: 'viewmodel.pingutilform',
5
6 data : {
7 rec : null
8 }
9 });
...\ No newline at end of file ...\ No newline at end of file
1
2 Ext.define('App.view.Proxy', {
3 extend : 'Ext.grid.Panel',
4 xtype : 'mvvm-ProxyView',
5 title : 'Proxy сервера',
6 store : 'Proxy',
7
8 tbar: [
9 {
10 text:'Добавить',
11 handler: function(){
12
13 if (winaddproxy==null) {
14 var winaddproxy = Ext.create('widget.window', { // создание окна
15 title:'Добавить',
16
17 maximize: function(){
18 this.callParent([true]); //animate
19 },
20
21 restore: function(){
22 this.callParent([true]); //animate
23 },
24
25 closeAction: 'hide',
26 items: [
27 {
28 xtype : 'mvvm-DetailProxyView',
29
30 viewModel : {
31 data : {
32 rec : {
33 proxy:"http_proxy='http://user:password@proxyserver:7777'"
34 }
35 }
36 }
37 }
38 ]
39 });
40
41 winaddproxy.show();
42 }
43
44
45
46 }
47 }] ,
48
49
50
51 columns: [{
52 text : '№',
53 dataIndex : 'id',
54 flex: 1
55 },
56 {
57 text : 'Proxy сервер',
58 dataIndex : 'proxy',
59 flex : 5
60 },
61 {
62 xtype: 'actioncolumn',
63 text : '#',
64 flex:1,
65 dataIndex: 'guid',
66 items: [{
67 icon: 'resources/img/tools.png',
68 handler: function (grid, rowIndex, colIndex) {
69 var rec = grid.getStore().getAt(rowIndex);
70
71 if (wintoolsproxy==null) {
72 var wintoolsproxy = Ext.create('widget.window', { // создание окна
73 title:'Изменить',
74
75 maximize: function(){
76 this.callParent([true]); //animate
77 },
78
79 restore: function(){
80 this.callParent([true]); //animate
81 },
82
83 closeAction: 'hide',
84 items: [
85 {
86 xtype : 'mvvm-DetailProxyView',
87 viewModel : {
88 data : {
89 rec : rec
90 }
91 }
92 }
93 ]
94
95 });
96
97 wintoolsproxy.show();
98 }
99 }
100 }
101 ],
102
103 action: 'tools'
104 },
105 ]
106 });
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 # =============================================================================
2 # This file provides an override point for default variables defined in
3 # defaults.properties.
4 #
5 # IMPORTANT - Sencha Cmd will merge your changes with its own during upgrades.
6 # To avoid potential merge conflicts avoid making large, sweeping changes to
7 # this file.
8 # =============================================================================
1 {
2 "sources": {
3 "package.json.tpl.merge": {
4 "12322b2f0769f491000df8ec0e012dd2d78a7eaf": "eJx1zrEKwjAQgOG9TxE6S9HV2VFcFBdxONJrDW1y8XIRSum7m2pTJzMd/3cHGQuVXunAYrlX5ei79pTmqdx8QQa/wiXNK2hGEOLZwJEbLMWQLURrgYfZzg9iUTksXqOA6bE+YNBsvBhy8+6RXKvqX1PUKA+6gxbz5Qs5LNu7altt19+Q9SDXP9oQW5BPzqknDX0qwhGXxPiMhjGkersXU/EGNatRVA\u003d\u003d"
5 },
6 "config.rb.tpl.merge": {
7 "33f446bd02c3fd24eb27891582eff6a2e789796b": "eJxLLi2KT8ksUrBVcMvMSdUDMvMSc1M14uPdPH1c4+M1ufJLSwpKS+KLSypzUoGqrPJSi0tSU7gALskTcA\u003d\u003d"
8 },
9 "all.scss.merge": {
10 "da39a3ee5e6b4b0d3255bfef95601890afd80709": "eJwDAAAAAAE\u003d"
11 },
12 "custom.js.merge": {
13 "199e99bbd15c3c0415569425cb21e77c95e9042a": "eJxlj0FOxDAMRfdziq9ZwUjTHIAlYslquIAncdtA4lSxC8PtSdoREmIV6f/4+dmdDjjhbY6KMSZGeycWrmQcQAqCGlWLMmEpUQzXb1xY/Ex4zgFnRMNXTAlSWseovCTybbbUDl6XsJHa1FH3sYX8B03cqqlS4OPQ//2V8CQ7K5fPriEBNjPU17gYjCZE6UnmYbacfj/GsaUNslUIhbVzu5lwq/2qVjIohGixCCVkkjiyWrOFzqWaXw0sViPr0IRYGVQ7yq+55X2HdObg7meo45udt4XnKyk7Je0Z5SWxqyyB6/Cu/Uh3ODj3crNhN28ar/f1D49P/7rLXUd7+QPuPI9g"
14 },
15 "theme.html.tpl.merge": {
16 "32f685a8af28baafcc7999862d0bd1f25df0e48b": "eJx1U02P0zAQvedXzPoEFW66CwfUTXopiwAhgbTlwNF1po13HdvY0zYR4r9jOwXSBXxI5HnzPqyxq6s3n9abr5/voKVOr4rqivMCANbWDV7tW4Jn8jncLK5vePy8nMM9GtkKeG/kvOA8Es68FkWzSkyoSJHG1V1P8OEeNi12CO+ENxhCVY7Y2NchiWhLjuO3gzrWbG0NoSG+GRwykOOuZoQ9lcnmFqK1D0j1l81b/pqtilHonBk+WtGA0Bp8EvTYgFbmMYAwDQTplaOQ+1LuTExwbNY1CzRoDC0iMaBof3aVITBoPe5qhr3onMZ5LpVngVF1yngQRzFWGQQva7a1lgJ54eYPga2qcgR/Rc++o1ha85Nq9kg8nV0ogx6+/8bS6oTfK7OE64Xrby+QSKR2Ca8WfyHOBkXKRlY8qSB1xEvcHtHvtD0t4aiC2uoJ/KP4k6znQSuJnlPMgPTivwjMnoS2TkhFQ0z9T+VyBmjCwSNsbTNAYzGAsZRzaeGAWgRvD6aJ85Q23iMfwO5g50UXK04Y1OVJmcae4NSigRRGmT3MymnE3MeTw0XykZjrT1JvhXzcZ98lxPGZ4ISP13F6hDzB8jzCqpw8gaQXZ51/Cclv5CfT2f4m"
17 },
18 "build.properties.merge": {
19 "8b81315dbe73ce9c08478f4c1d2df84f456efcf5": "eJytkEtOxEAMRPdzipKyhbkBCzQrFnzE5AKetJNYdOzI3UnE7XGA3GC8K5f9/GnwdM84NWhHKeglM2a3VRIXkMJWdg+B2UQrenMk7mnJFSu50C1HXWREOUEUAfr3yzk4M3sVLudTE8bL68f7Z/v81uIRV9ZuJFymhE1yxsQ+ML5tcUReh6BuUkdILbBNkRYXHbDMg1P6BaI10GqSYrXKWoUOSmfaZ+mi88+f6GvvzRTmA8rGPO/6mFMtYPW4fiff97U/al6C1w\u003d\u003d"
20 },
21 "sencha.cfg.tpl.merge": {
22 "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"
23 },
24 "testing.properties.merge": {
25 "e65f969c42eb4f355c850fc58fea852582f20db8": "eJyVkUFywyAQBO9+xVb5oIutH/gX+QCCkbUOAooFOf59FsmqpHKKOFEwOzM0Z7r9f53O9DGx0Mge5DBygFDKMSEX1m0VOBpepLqhsndXnpPvv2Z/oefEdiKdLRNoMAJqdyqMI5lAJiXP1hSOQbbZ5msh0mskmuOvnDHHWY32JjbmDEkxOCqxBai6K5DC4d693RAWzjHMCOVCkmB5ZLhW9EWdINjJtBJv9T7cU0vXsk/2rWwxn9AisHA6AooLcgNhqi8riYXdimAn0P+07vXsCOuD8rNimLWaiDKkmBrK7UOUyR0B2RRQdzXedyp+CMVaUi0rQn3ninMxvurPspjBQ/54jjHvYLbHycGKG5Fm2SIf0u/ut9M3l43NIg\u003d\u003d"
26 }
27 },
28 "targets": {
29 "package.json": {
30 "source": "package.json.tpl.merge",
31 "version": "12322b2f0769f491000df8ec0e012dd2d78a7eaf",
32 "parameters": {
33 "pkgType": "theme",
34 "touchRelPath": "../../../touch",
35 "senchadir": ".sencha",
36 "pkgName": "ext-theme-crisp-touch",
37 "extRelPath": "../.."
38 }
39 },
40 "sass/config.rb": {
41 "source": "config.rb.tpl.merge",
42 "version": "33f446bd02c3fd24eb27891582eff6a2e789796b",
43 "parameters": {
44 "pkgType": "theme",
45 "touchRelPath": "../../../touch",
46 "senchadir": ".sencha",
47 "pkgName": "ext-theme-crisp-touch",
48 "extRelPath": "../.."
49 }
50 },
51 "sass/etc/all.scss": {
52 "source": "all.scss.merge",
53 "version": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
54 "parameters": {
55 "pkgType": "theme",
56 "touchRelPath": "../../../touch",
57 "senchadir": ".sencha",
58 "pkgName": "ext-theme-crisp-touch",
59 "extRelPath": "../.."
60 }
61 },
62 "sass/example/custom.js": {
63 "source": "custom.js.merge",
64 "version": "199e99bbd15c3c0415569425cb21e77c95e9042a",
65 "parameters": {
66 "pkgType": "theme",
67 "touchRelPath": "../../../touch",
68 "senchadir": ".sencha",
69 "pkgName": "ext-theme-crisp-touch",
70 "extRelPath": "../.."
71 }
72 },
73 "sass/example/theme.html": {
74 "source": "theme.html.tpl.merge",
75 "version": "32f685a8af28baafcc7999862d0bd1f25df0e48b",
76 "parameters": {
77 "pkgType": "theme",
78 "touchRelPath": "../../../touch",
79 "senchadir": ".sencha",
80 "pkgName": "ext-theme-crisp-touch",
81 "extRelPath": "../.."
82 }
83 },
84 ".sencha/package/build.properties": {
85 "source": "build.properties.merge",
86 "version": "8b81315dbe73ce9c08478f4c1d2df84f456efcf5",
87 "parameters": {
88 "pkgType": "theme",
89 "touchRelPath": "../../../touch",
90 "senchadir": ".sencha",
91 "pkgName": "ext-theme-crisp-touch",
92 "extRelPath": "../.."
93 }
94 },
95 ".sencha/package/sencha.cfg": {
96 "source": "sencha.cfg.tpl.merge",
97 "version": "6d1982cce48163a98dc46012d1d0cdfa209fbda6",
98 "parameters": {
99 "pkgType": "theme",
100 "touchRelPath": "../../../touch",
101 "senchadir": ".sencha",
102 "pkgName": "ext-theme-crisp-touch",
103 "extRelPath": "../.."
104 }
105 },
106 ".sencha/package/testing.properties": {
107 "source": "testing.properties.merge",
108 "version": "e65f969c42eb4f355c850fc58fea852582f20db8",
109 "parameters": {
110 "pkgType": "theme",
111 "touchRelPath": "../../../touch",
112 "senchadir": ".sencha",
113 "pkgName": "ext-theme-crisp-touch",
114 "extRelPath": "../.."
115 }
116 }
117 }
118 }
...\ No newline at end of file ...\ No newline at end of file
1 # =============================================================================
2 # This file defines properties used by build-impl.xml and the associated
3 # *-impl.xml files (sass-impl.xml, js-impl.xml, etc.), which are the core of
4 # the applications build process.
5 #
6 # IMPORTANT - This file is not modifiable by a package, and will be overwritten
7 # during each app upgrade. Please use build.properties for defining package
8 # customizations to these properties.
9 # =============================================================================
10
11 # ===========================================
12 # properties defining various directory
13 # locations
14 # ===========================================
15 build.dir=${package.build.dir}
16 build.resources.dir=${build.dir}/resources
17 package.resources.dir=${package.dir}/resources
18 package.sass.dir=${package.dir}/sass
19 package.licenses.dir=${package.dir}/licenses
20
21 # ===========================================
22 # definitions of various file name patterns
23 # used for output artifacts
24 # ===========================================
25 build.name.prefix=${build.dir}/${package.name}
26 build.name.css.prefix=${build.resources.dir}/${package.name}
27 build.name.ruby=config.rb
28
29 build.debug.suffix=-debug
30 build.all.suffix=-all
31 build.rtl.suffix=-rtl
32
33 build.all.debug.suffix=${build.all.suffix}${build.debug.suffix}
34 build.all.rtl.suffix=${build.all.suffix}${build.rtl.suffix}
35 build.all.rtl.debug.suffix=${build.all.suffix}${build.rtl.suffix}${build.debug.suffix}
36
37 # ===========================================
38 # define the output js file names for dev,
39 # debug, and compressed (no suffix)
40 # ===========================================
41 build.all.js=${build.name.prefix}.js
42 build.all.debug.js=${build.name.prefix}${build.debug.suffix}.js
43
44 # ===========================================
45 # output file names for the scss files
46 # ===========================================
47 build.all.scss=${build.name.prefix}${build.all.debug.suffix}.scss
48 build.all.rtl.scss=${build.name.prefix}${build.all.rtl.debug.suffix}.scss
49
50 # ===========================================
51 # output file names for the css files
52 # generated from the scss files by running
53 # a compass compilation
54 # ===========================================
55 build.all.css.debug.prefix=${package.name}${build.all.debug.suffix}
56 build.all.css.debug=${build.resources.dir}/${build.all.css.debug.prefix}.css
57 build.all.rtl.css.debug.prefix=${package.name}${build.all.rtl.debug.suffix}
58 build.all.rtl.css.debug=${build.resources.dir}/${build.all.rtl.css.debug.prefix}.css
59 build.all.css.prefix=${package.name}${build.all.suffix}
60 build.all.css=${build.resources.dir}/${build.all.css.prefix}.css
61 build.all.rtl.css.prefix=${package.name}${build.all.rtl.suffix}
62 build.all.rtl.css=${build.resources.dir}/${build.all.rtl.css.prefix}.css
63
64 build.all.ruby=${build.dir}/${build.name.ruby}
65
66 # ===========================================
67 # options to pass to the 'sencha fs slice' command
68 # ===========================================
69 build.slice.options=
70
71 # ===========================================
72 # preprocessor options used when generating
73 # concatenated js output files
74 # ===========================================
75 build.compile.js.debug.options=debug:true
76 build.compile.js.options=debug:false
77
78 # enables / disables removing text references from
79 # package js build files
80 build.remove.references=false
81
82 # This property can be modified to change general build options
83 # such as excluding files from the set. The format expects newlines
84 # for each argument, for example:
85 #
86 # build.operations=\
87 # exclude\n \
88 # -namespace=Ext\n
89 #
90 # NOTE: modifications to build.operations are intended to be
91 # placed in an override of the "-after-init" target, where it
92 # can be calculated based on other
93 # ant properties
94 #
95 # build.operations=
96
97 # ===========================================
98 # compression option used to generate '-all'
99 # js output file
100 # ===========================================
101 build.compile.js.compress=+yui
102
103 # ===========================================
104 # selector count threshold to use when
105 # splitting a single css file into multiple
106 # css files (IE selector limit workaround)
107 # ===========================================
108 build.css.selector.limit=4095
109
110 # controls the ruby command used to execute compass. a full path
111 # to ruby may be specified rather than allowing the system shell
112 # to resolve the command
113 build.ruby.path=ruby
114
115 # controls the working directory of the child compass process
116 # and the output location for the .sass-cache folder
117 compass.working.dir=${build.dir}
118
119 # enables / disables console highlighting for compass
120 compass.compile.boring=false
121
122 # enables / disables forced rebuilds for compass
123 compass.compile.force=true
124
125 # enables / disables stack traces in compass failure output
126 compass.compile.trace=true
127
128 # ===========================================
129 # Options for sub-packages
130
131 # Set to true/1 to enable build.version inheritance by sub-pacakges
132 build.subpkgs.inherit.version=0
133
134 # ===========================================
135 # theme slicing example page settings
136 # ===========================================
137 package.example.dir=${package.dir}/sass/example
138 package.example.base=${build.all.rtl.css.debug.prefix}
139 package.example.css.rel=resources/${package.example.base}.css
140 package.example.css=${build.dir}/${package.example.css.rel}
141 package.example.scss=${build.dir}/${package.example.base}.scss
142 package.example.theme.html=${package.example.dir}/theme.html
143
144 bootstrap.base.path=${package.example.dir}
145 bootstrap.example.js=${package.example.dir}/bootstrap.js
146
147
148 # ===========================================
149 # options controlling output packaging
150 # operations for output '.pkg' file
151 # ===========================================
152 pkg.build.dir=${workspace.build.dir}/${package.name}
153 pkg.file.name=${package.name}.pkg
154 pkg.includes=**/*
155 pkg.excludes=package.json
1 <project name="find-cmd-impl">
2 <!--
3 Run "sencha which" to find the Sencha Cmd basedir and get "cmd.dir" setup. We
4 need to execute the command with curdir set properly for Cmd to pick up that we
5 are running for an application.
6 -->
7 <target name="find-cmd-in-path" unless="cmd.dir">
8 <exec executable="sencha"
9 dir="${basedir}"
10 failifexecutionfails="false"
11 outputproperty="exec.error">
12 <arg value="which"/>
13 <arg value="-p=cmd.dir"/>
14 <arg value="-o=$cmddir$"/>
15 </exec>
16
17 <!-- Now read the generated properties file and delete it -->
18 <property file="$cmddir$"/>
19 <delete file="$cmddir$"/>
20 </target>
21
22 <!--
23 Run "sencha which" again, similar to the above target, but explicitly check
24 for the 'SENCHA_CMD' environment variable to have been set, in case sencha
25 cmd isn't on the current path settings for the user
26 -->
27 <target name="find-cmd-in-environment" unless="cmd.dir">
28 <exec executable="${env.SENCHA_CMD}/sencha"
29 dir="${basedir}"
30 failifexecutionfails="false">
31 <arg value="which"/>
32 <arg value="-p=cmd.dir"/>
33 <arg value="-o=$cmddir$"/>
34 </exec>
35
36 <property file="$cmddir$"/>
37 <delete file="$cmddir$"/>
38 </target>
39
40 <!--
41 == Mac OSX launchd fix ==
42 create a child shell process that will source in ~/.bash_profile
43 and then attempt to call 'sencha which' with the current user's
44 shell profile settings. sencha which will create a properties file
45 that can then be loaded into this (the parent) process.
46
47 This allows ant integrations in IDE's like netbeans or eclipse to properly
48 locate Sencha Cmd, even if the IDE was launched via launchd (Finder)
49 -->
50 <target name="find-cmd-in-shell" unless="cmd.dir">
51 <delete quiet="true" file="$cmddir$"/>
52 <echo file="tmp.sh"> source ~/.bash_profile; sencha which -p cmd.dir -o '$cmddir$'</echo>
53 <exec executable="/bin/sh"><arg value="tmp.sh"/></exec>
54 <property file="$cmddir$"/>
55 <delete file="tmp.sh"/>
56 <delete file="$cmddir$"/>
57 </target>
58 </project>
...\ No newline at end of file ...\ No newline at end of file
1 <project name="init-impl">
2 <!--
3 Init-Local
4 -->
5 <target name="-before-init-local"/>
6 <target name="-init-local">
7 <!--
8 ${basedir} is actually the basedir of build.xml, in the app root
9 so this imports ${app.dir}/local.properties, if present
10 -->
11 <property file="${basedir}/local.properties"/>
12
13 <!--
14 This will traverse upwards in the file system, starting at the
15 app root directory, looking for the workspace. Once found,
16 ${workspace.dir}/local.properties will be imported into this
17 project
18 -->
19 <script language="javascript">
20 <![CDATA[
21 var f = new java.io.File(project.getProperty("basedir"));
22 var sub = ".sencha/workspace/sencha.cfg";
23
24 for (var p = f; p; p = p.getParentFile()) {
25 var t = new java.io.File(p, sub);
26 if (t.exists()) {
27 // we found the workspace folder!
28
29 t = new java.io.File(p, "local.properties");
30 if (t.exists()) {
31 var loader = project.createTask("property");
32 loader.setFile(new java.io.File(t.getCanonicalPath()));
33 loader.execute();
34 }
35
36 break;
37 }
38 }
39 ]]>
40 </script>
41
42 </target>
43 <target name="-after-init-local"/>
44 <target name="init-local"
45 depends="-before-init-local,-init-local,-after-init-local"/>
46
47 <!--
48 Apply Version
49 -->
50 <target name="-before-apply-version"/>
51 <target name="-after-apply-version"/>
52 <target name="apply-version" if="build.version">
53 <echo>Switch package version to ${build.version}</echo>
54 <antcall target="-before-apply-version"/>
55
56 <x-set-json-version file="${basedir}/package.json"
57 version="${build.version}"/>
58
59 <antcall target="-after-apply-version"/>
60 </target>
61
62 <target name="-before-init"/>
63 <target name="-init" unless="internal.x-sencha-initialized">
64 <antcall target="apply-version"/>
65
66 <!--
67 Now, apply various project updates, such as ant class loader path
68 updates, as well as loading Sencha Cmd config system properties
69 into ant property space
70 -->
71 <x-sencha-init prefix=""/>
72
73 <!--
74 default the build environment to production if it is unset by this point
75 -->
76 <property name="build.environment" value="production"/>
77 <property name="CR" value="&#10;"/>
78 <property name="build.version" value="${package.version}"/>
79
80 <x-load-properties>
81 <file path="${package.config.dir}/${build.environment}.properties" required="false"/>
82 <file path="${package.config.dir}/build.properties" required="false"/>
83 <file path="${package.config.dir}/defaults.properties" required="true"/>
84 </x-load-properties>
85
86 <!--
87 See if there is a ./resources subfolder
88 -->
89 <if>
90 <not>
91 <available file="${package.resources.dir}" type="dir"/>
92 </not>
93 <then>
94 <property name="skip.resources" value="1"/>
95 <property name="skip.slice" value="1"/>
96 </then>
97 </if>
98
99
100 <!--
101 See if there is a ./sass subfolder
102 -->
103 <if>
104 <not>
105 <available file="${package.sass.dir}" type="dir"/>
106 </not>
107 <then>
108 <property name="skip.sass" value="1"/>
109 </then>
110 </if>
111
112 <!--
113 Slicing operations are not needed when using the touch framework
114 or for non-theme packages
115 -->
116 <if>
117 <or>
118 <not>
119 <equals arg1="theme" arg2="${package.type}"/>
120 </not>
121 <equals arg1="touch" arg2="${framework.name}"/>
122 </or>
123 <then>
124 <property name="skip.slice" value="1"/>
125 </then>
126 </if>
127
128 <!--
129 See if there is an ./examples subfolder full of example applications.
130 -->
131 <if>
132 <not>
133 <available file="${package.examples.dir}" type="dir"/>
134 </not>
135 <then>
136 <property name="skip.examples" value="1"/>
137 </then>
138 </if>
139
140 <!--
141 See if there is a ./packages subfolder full of packages. This is only allowed
142 for framework packages.
143 -->
144 <if>
145 <not>
146 <and>
147 <equals arg1="${package.type}" arg2="framework"/>
148 <available file="${package.subpkgs.dir}" type="dir"/>
149 </and>
150 </not>
151 <then>
152 <property name="skip.subpkgs" value="1"/>
153 </then>
154 </if>
155
156 <if>
157 <not>
158 <isset property="package.framework"/>
159 </not>
160 <then>
161 <property name="skip.style" value="1"/>
162 </then>
163 </if>
164
165 <if>
166 <isset property="skip.style"/>
167 <then>
168 <property name="skip.sass" value="1"/>
169 <property name="skip.capture" value="1"/>
170 <property name="skip.slice" value="1"/>
171 </then>
172 </if>
173
174 <if>
175 <not>
176 <isset property="package.base.names"/>
177 </not>
178 <then>
179 <property name="skip.inherit" value="1"/>
180 </then>
181 </if>
182
183 <!--
184 this id string is used to share a common compiler instance
185 for all x-compile calls in this project
186 -->
187 <property name="compiler.ref.id" value="package-compiler"/>
188
189 <fileset id="pkg.files"
190 dir="${package.dir}"
191 includes="${pkg.includes}"
192 excludes="${pkg.excludes}">
193 <exclude name="**/.sass-cache/**/*"/>
194 <exclude name="**/.sass-cache"/>
195 <exclude name="**/theme-capture.*"/>
196 </fileset>
197
198 <!--
199 this property is set indicating we've reached the end of the
200 core init phase. it's presence will indicate that we've already
201 executed this target, and will bypass firing the init code
202 repeatedly in sub projects (antcall, x-ant-call)
203 See the above 'unless' attribute on the -init target
204 -->
205 <property name="internal.x-sencha-initialized" value="true"/>
206 </target>
207 <target name="-after-init"/>
208
209 <target name="-before-init-defaults"/>
210 <target name="-init-defaults">
211 <!--
212 This property can be modified to change general build options
213 such as excluding files from the set. The format expects newlines
214 for each argument, for example:
215
216 <property name="build.operations"/>
217 exclude
218 -namespace=Ext
219 </property>
220 -->
221 <property name="build.operations" value=""/>
222
223 <!--
224 This property can be modified to change concatenation
225 specific options
226
227 -strip-comments: comment suppression
228 -remove-text-references: transform string literal class references to objects
229 -beautify: unpack the source
230
231 <property name="build.concat.options"/>
232 -strip-comments
233 -remove-text-references
234 -beautify
235 </property>
236 -->
237 <property name="build.concat.options" value=""/>
238 <property name="build.concat.debug.options" value=""/>
239
240 <property name="build.pkg.manifest" value="pkg.files"/>
241 </target>
242 <target name="-after-init-defaults"/>
243
244 <!--
245 Initializes the compiler instances, reading in the app.json and package.json
246 definitions, as well as scanning and parsing all js files found on the
247 various classpath entries for the framework, workspace, packages, and app
248 -->
249 <target name="-init-compiler" depends="-init">
250 <x-compile refid="${compiler.ref.id}"
251 dir="${package.dir}"
252 initOnly="true"
253 inheritAll="true">
254 <![CDATA[
255 # base build command
256 -tempDir=${build.compile.temp.dir}
257 -keepTempDir=${build.compile.temp.dir.keep}
258 include
259 -all
260 and
261 save
262 package-${package.name}-all
263 ]]>
264 </x-compile>
265 </target>
266 </project>
...\ No newline at end of file ...\ No newline at end of file
1 <project name="js-impl">
2 <target name="-init-compile-js" depends="-init-compiler">
3 <if>
4 <equals arg1="theme" arg2="${package.type}"/>
5 <then>
6 <property name="build.compile.js.filter">
7 <![CDATA[
8 union
9 -tag=package-${package.name}
10 and
11 include
12 -tag=package-${package.name}-base
13 and
14 ${build.operations}
15 ]]>
16 </property>
17 </then>
18 <else>
19 <property name="build.compile.js.filter">
20 <![CDATA[
21 union
22 -tag=package-${package.name}
23 and
24 ${build.operations}
25 ]]>
26 </property>
27 </else>
28 </if>
29 </target>
30
31 <target name="-compile-js-debug" depends="-init-compile-js">
32 <x-compile refid="${compiler.ref.id}">
33 <![CDATA[
34 restore
35 package-${package.name}-all
36 and
37 -options=${build.compile.js.debug.options}
38 ${build.compile.js.filter}
39 and
40 concatenate
41 -remove-text-references=${build.remove.references}
42 -output-file=${build.all.debug.js}
43 ${build.concat.debug.options}
44 ]]>
45 </x-compile>
46 </target>
47
48 <target name="-compile-js-non-debug" depends="-init-compile-js">
49 <x-compile refid="${compiler.ref.id}">
50 <![CDATA[
51 restore
52 package-${package.name}-all
53 and
54 -options=${build.compile.js.options}
55 ${build.compile.js.filter}
56 and
57 concatenate
58 -remove-text-references=${build.remove.references}
59 ${build.compile.js.compress}
60 -output-file=${build.all.js}
61 ${build.concat.options}
62 ]]>
63 </x-compile>
64 </target>
65
66 <target name="-before-js"/>
67 <target name="-after-js"/>
68 <target name="-js"
69 depends="-compile-js-debug,-compile-js-non-debug"/>
70
71 </project>
...\ No newline at end of file ...\ No newline at end of file
1 <project basedir=".">
2 <!--
3 This file can be freely edited, so long as the <import file="${sencha.workspace.config.dir}/plugin.xml"/>
4 statement is not removed.
5
6 One of the purposes of this file is to hook various Sencha Command operations and do
7 processing before or after the command is processed. To do this, simply provide the
8 logic in a <target> using one of these names:
9
10 -before-generate-app Called before an application is generated
11 -after-generate-app Called after an application is generated
12
13 -before-generate-controller Called before a controller is generated
14 -after-generate-controller Called after a controller is generated
15
16 -before-generate-model Called before a model is generated
17 -after-generate-model Called after a model is generated
18
19 -before-generate-profile Called before a profile is generated
20 -after-generate-profile Called after a profile is generated
21 -->
22 <import file="${workspace.config.dir}/plugin.xml"/>
23
24 <!--
25 <target name="-after-generate-model">
26 ... use ${args.path}, ${args.name} and ${args.fields} as needed ...
27 </target>
28
29 Other targets are similar. There are properties prefixed with "args." and the name of
30 the command line option that hold the parameters for the command.
31 -->
32 </project>
1 <project name="refresh-impl">
2 <import file="bootstrap-impl.xml"/>
3
4 <target name="-refresh-pkg" depends="init"/>
5 <!--
6 Refresh app
7 -->
8 <target name="-before-refresh"/>
9 <target name="-refresh" depends="-refresh-pkg"/>
10 <target name="-after-refresh"/>
11 </project>
...\ No newline at end of file ...\ No newline at end of file
1 <project name="resources-impl">
2 <target name="-before-inherit-resources"/>
3 <target name="-after-inherit-resources"/>
4 <target name="-inherit-resources">
5 <for list="${package.base.packages}" param="base">
6 <sequential>
7 <local name="base.path"/>
8 <local name="base.resource.path"/>
9 <property name="base.path" location="@{base}"/>
10 <property name="base.resource.path" location="${base.path}/resources"/>
11 <echo>Merging resources from base package ${base.path}</echo>
12 <if>
13 <available file="${base.resource.path}" type="dir"/>
14 <then>
15 <copy todir="${build.dir}/resources/" overwrite="true">
16 <fileset dir="${base.resource.path}" includes="**/*"/>
17 </copy>
18 </then>
19 </if>
20 </sequential>
21 </for>
22 </target>
23
24 <target name="-before-copy-resources"/>
25 <target name="-after-copy-resources"/>
26 <target name="-copy-resources">
27 <echo>Merging resources from current package ${package.resources.dir}</echo>
28 <copy todir="${build.dir}/resources" overwrite="true">
29 <fileset dir="${package.resources.dir}" includes="**/*"/>
30 </copy>
31 </target>
32 </project>
...\ No newline at end of file ...\ No newline at end of file
1 <project name="sass-impl">
2
3 <target name="-init-sass-compiler">
4 <x-normalize-path path="${build.dir}/resources"
5 property="image.search.path"/>
6 </target>
7
8 <target name="-compile-sass-rtl" depends="-init-sass-compiler">
9 <x-compile refid="${compiler.ref.id}">
10 <![CDATA[
11 include
12 -all
13 and
14 sass
15 -etc=true
16 -vars=true
17 -rules=true
18 -class-name-vars=true
19 -variable=$image-search-path:'${image.search.path}' !default
20 -variable=$theme-name: '${package.name}' !default
21 -output=${build.all.rtl.scss}
22 and
23 sass
24 -ruby=true
25 -output=${build.all.ruby}
26 ]]>
27 </x-compile>
28 </target>
29
30 <target name="-compile-sass-ltr" depends="-init-sass-compiler">
31 <x-compile refid="${compiler.ref.id}">
32 <![CDATA[
33 exclude
34 -all
35 and
36 include
37 -not
38 -namespace=Ext.rtl
39 and
40 sass
41 -etc=true
42 -vars=true
43 -rules=true
44 -class-name-vars=true
45 -variable=$image-search-path:'${image.search.path}' !default
46 -variable=$theme-name: '${package.name}' !default
47 -output=${build.all.scss}
48 and
49 sass
50 -ruby=true
51 -output=${build.all.ruby}
52 ]]>
53 </x-compile>
54 </target>
55
56 <target name="-compile-sass"
57 depends="-compile-sass-rtl,-compile-sass-ltr"/>
58
59 <macrodef name="x-compress-css-files">
60 <attribute name="dir"/>
61 <attribute name="prefix"/>
62 <attribute name="outprefix"/>
63 <sequential>
64 <x-split-css file="@{dir}/@{prefix}.css"
65 outdir="${build.resources.dir}"
66 limit="${build.css.selector.limit}"/>
67
68 <for param="cssfile">
69 <fileset dir="@{dir}" includes="@{prefix}*.css"/>
70 <sequential>
71 <local name="css.output.name"/>
72 <local name="pattern"/>
73 <property name="pattern" value="(.*?)(@{prefix})(_\d{1,2})*\.css"/>
74 <propertyregex property="css.output.name"
75 input="@{cssfile}"
76 regexp="${pattern}"
77 select="\1@{outprefix}\3.css"
78 override="true"/>
79 <x-compress-css srcfile="@{cssfile}"
80 outfile="${css.output.name}"/>
81 </sequential>
82 </for>
83 </sequential>
84 </macrodef>
85
86 <target name="-compass-compile" depends="-compile-sass">
87 <x-compass-compile
88 rubyPath="${build.ruby.path}"
89 trace="${compass.compile.trace}"
90 boring="${compass.compile.boring}"
91 force="${compass.compile.force}"
92 dir="${compass.working.dir}"
93 sassdir="${build.dir}"
94 cssdir="${build.dir}/resources"
95 config="${build.all.ruby}"/>
96 </target>
97
98 <target name="-compile-css" depends="-compass-compile">
99 <x-compress-css-files
100 dir="${build.resources.dir}"
101 prefix="${build.all.css.debug.prefix}"
102 outprefix="${build.all.css.prefix}"/>
103
104 <x-compress-css-files
105 dir="${build.resources.dir}"
106 prefix="${build.all.rtl.css.debug.prefix}"
107 outprefix="${build.all.rtl.css.prefix}"/>
108 </target>
109
110 <target name="-before-sass"/>
111 <target name="-sass" depends="-compile-css"/>
112 <target name="-after-sass"/>
113
114 </project>
...\ No newline at end of file ...\ No newline at end of file
1 # The name of the package - should match the "name" property in ./package.json
2 #
3 package.name=ext-theme-crisp-touch
4
5 # The namespace to which this package's SASS corresponds. The default value of
6 # "Ext" means that the files in ./sass/src (and ./sass/var) match classes in
7 # the Ext" root namespace. In other words, "Ext.panel.Panel" maps to
8 # ./sass/src/panel/Panel.scss.
9 #
10 # To style classes from any namespace, set this to blank. If this is blank,
11 # then to style "Ext.panel.Panel" you would put SASS in
12 # ./sass/src/Ext/panel/Panel.scss.
13 #
14 package.sass.namespace=Ext
15
16 # This is the comma-separated list of folders where classes reside. These
17 # classes must be explicitly required to be included in the build.
18 #
19 package.classpath=${package.dir}/src
20
21 # This is the comma-separated list of folders of overrides. All files in this
22 # path will be given a tag of "packageOverrides" which is automatically
23 # required in generated apps by the presence of this line in app.js:
24 #
25 # //@require @packageOverrides
26 #
27 package.overrides=${package.dir}/overrides
28
29 # This is the folder where SASS "src" resides. This is searched for SCSS
30 # files that match the JavaScript classes used by the application.
31 #
32 package.sass.srcpath=${package.dir}/sass/src
33
34 # This is the folder where SASS "vars" resides. This is searched for SCSS
35 # files that match the JavaScript classes used by the application.
36 #
37 package.sass.varpath=${package.dir}/sass/var
38
39 # This file is automatically imported into the SASS build before "vars".
40 #
41 package.sass.etcpath=${package.dir}/sass/etc/all.scss
42
43 # This is the folder in which to place "sencha packaage build" output.
44 #
45 package.build.dir=${package.dir}/build
46
47 # The folder that contains example application(s) for this package.
48 #
49 package.examples.dir=${package.dir}/examples
50
51 # The folder that contains sub-packages of this package. Only valid for "framework"
52 # package type.
53 #
54 package.subpkgs.dir=${package.dir}/packages
55
56 #==============================================================================
57 # Custom Properties - Place customizations below this line to avoid merge
58 # conflicts with newer versions
59
60 package.cmd.version=5.0.0.160
61
62 package.framework=ext
63
64 skip.pkg=1
...\ No newline at end of file ...\ No newline at end of file
1 <project name="slice-impl">
2
3 <target name="-generate-slicer-bootstrap" depends="-init-compiler">
4
5 <local name="relpath"/>
6 <x-get-relative-path from="${bootstrap.base.path}"
7 to="${framework.packages.dir}"
8 property="relpath"/>
9
10 <local name="override.tpl"/>
11 <local name="override.tpl.type"/>
12
13 <x-script-def name="x-detect-sencha-5">
14 <![CDATA[
15 importPackage(com.sencha.util);
16 importPackage(com.sencha.logging);
17
18 var frameworkName = project.getProperty("framework.name"),
19 frameworkVersion = project.getProperty("framework.version") || "0.0.0.0";
20
21 try {
22 var frameworkVer = new Version(frameworkVersion),
23 limit = new Version('5.0.0.0');
24 if(frameworkVer.compareTo(limit) >= 0) {
25 project.setProperty('override.tpl.type', 'jsonp');
26 project.setProperty('override.tpl', 'Ext.Loader.loadScriptsSync');
27 }
28 } catch (err) {
29 }
30 ]]>
31 </x-script-def>
32 <x-detect-sencha-5/>
33
34 <property name="override.tpl.type" value="tpl"/>
35 <property name="override.tpl" value='Ext.Loader.loadScriptFile("{0}", Ext.emptyFn);'/>
36
37 <x-bootstrap file="${bootstrap.example.js}"
38 basedir="${bootstrap.base.path}"
39 includeBoot="true"
40 includeCoreFiles="true"
41 overrideTpl="${override.tpl}"
42 overrideTplType="${override.tpl.type}"
43 overrideExcludeTags="">
44 <![CDATA[
45 Ext.Boot.loadSync([
46 "render.js",
47 "${relpath}/ext-theme-base/sass/example/manifest.js",
48 "${relpath}/ext-theme-base/sass/example/shortcuts.js",
49 "custom.js"
50 ]);
51 ]]>
52 </x-bootstrap>
53 </target>
54
55 <target name="-update-slicer-css">
56 <x-get-relative-path
57 from="${package.example.dir}"
58 to="${package.example.css}"
59 property="package.example.css.path"
60 />
61
62 <!--update the app's example to point to the build output-->
63 <echo file="${package.example.dir}/example.css">
64 /*
65 * This file is generated by Sencha Cmd and should NOT be edited. It redirects
66 * to the most recently built CSS file for the application to allow theme.html
67 * to load properly for image slicing (required to support non-CSS3 browsers
68 * such as IE9 and below).
69 */
70 @import '${package.example.css.path}';
71 </echo>
72 </target>
73
74
75 <target name="-capture-theme-image"
76 depends="-generate-slicer-bootstrap,-update-slicer-css">
77 <echo>Capture theme image to ${build.dir}/theme-capture.png</echo>
78 <x-sencha-command dir="${package.dir}">
79 <![CDATA[
80 theme
81 capture
82 -page=${package.sass.dir}/example/theme.html
83 -image=${build.dir}/theme-capture.png
84 -manifest=${build.dir}/theme-capture.json
85 ]]>
86 </x-sencha-command>
87 </target>
88
89 <target name="-slice-theme-images" depends="-capture-theme-image">
90 <echo>Slicing theme images to ${build.resources.dir}</echo>
91 <x-sencha-command dir="${package.dir}">
92 <![CDATA[
93 fs
94 slice
95 ${build.slice.options}
96 -image=${build.dir}/theme-capture.png
97 -manifest=${build.dir}/theme-capture.json
98 -out=${build.resources.dir}
99 ]]>
100 </x-sencha-command>
101 </target>
102
103 <target name="-before-slice"/>
104 <target name="-after-slice"/>
105 <target name="-slice"
106 depends="-slice-theme-images"/>
107
108 </project>
...\ No newline at end of file ...\ No newline at end of file
1 <project name="package.sub.builds">
2
3 <macrodef name="x-process-sub-packages">
4 <attribute name="all" default="false"/>
5 <element name="tasks" implicit="true"/>
6 <sequential>
7 <if>
8 <and>
9 <isset property="package.subpkgs.dir"/>
10 <available file="${package.subpkgs.dir}" type="dir"/>
11 </and>
12 <then>
13 <local name="sub.packages.list"/>
14 <condition property="sub.packages.list" value="${package.subpkgs}">
15 <and>
16 <isset property="package.subpkgs"/>
17 <equals arg1="@{all}" arg2="false"/>
18 </and>
19 </condition>
20 <property name="sub.packages.list" value="*"/>
21 <for param="pkg-dir">
22 <dirset dir="${package.subpkgs.dir}" includes="${sub.packages.list}"/>
23 <sequential>
24 <if>
25 <available file="@{pkg-dir}/.sencha/package/sencha.cfg"/>
26 <then>
27 <tasks/>
28 </then>
29 </if>
30 </sequential>
31 </for>
32 </then>
33 </if>
34 </sequential>
35 </macrodef>
36
37 <macrodef name="x-process-examples">
38 <attribute name="all" default="false"/>
39 <element name="tasks" implicit="true"/>
40 <sequential>
41 <if>
42 <and>
43 <isset property="package.examples.dir"/>
44 <available file="${package.examples.dir}" type="dir"/>
45 </and>
46 <then>
47 <local name="example.list"/>
48 <condition property="example.list" value="${package.examples}">
49 <and>
50 <isset property="package.examples"/>
51 <equals arg1="@{all}" arg2="false"/>
52 </and>
53 </condition>
54 <property name="example.list" value="*"/>
55 <for param="example-dir">
56 <dirset dir="${package.examples.dir}" includes="${example.list}"/>
57 <sequential>
58 <if>
59 <available file="@{example-dir}/.sencha/app/sencha.cfg"/>
60 <then>
61 <tasks/>
62 </then>
63 </if>
64 </sequential>
65 </for>
66 </then>
67 </if>
68 </sequential>
69 </macrodef>
70
71 <macrodef name="x-run-sub-build">
72 <attribute name="dir"/>
73 <attribute name="target"/>
74 <element name="properties" implicit="true"/>
75 <sequential>
76 <if>
77 <available file="@{dir}/build.xml"/>
78 <then>
79 <local name="sub.name"/>
80 <basename file="@{dir}"
81 property="sub.name"/>
82 <ant dir="@{dir}"
83 inheritall="false"
84 inheritrefs="true"
85 target="@{target}">
86 <property name="compiler.ref.id"
87 value="compiler-${sub.name}"/>
88 <properties/>
89 </ant>
90 </then>
91 </if>
92 </sequential>
93 </macrodef>
94
95 <macrodef name="x-sub-build">
96 <attribute name="dir"/>
97 <attribute name="target" default="build"/>
98 <attribute name="inherit-version" default="0"/>
99 <sequential>
100 <if>
101 <x-is-true value="@{inherit-version}"/>
102 <then>
103 <x-run-sub-build dir="@{dir}" target="@{target}">
104 <property name="cmd.dir" value="${cmd.dir}"/>
105 <property name="build.version" value="${build.version}"/>
106 </x-run-sub-build>
107 </then>
108 <else>
109 <x-run-sub-build dir="@{dir}" target="@{target}">
110 <property name="cmd.dir" value="${cmd.dir}"/>
111 </x-run-sub-build>
112 </else>
113 </if>
114 </sequential>
115 </macrodef>
116
117 <target name="-before-subpkgs"/>
118 <target name="-after-subpkgs"/>
119 <target name="-subpkgs">
120 <x-process-sub-packages>
121 <x-sub-build dir="@{pkg-dir}"
122 inherit-version="${build.subpkgs.inherit.version}"/>
123 </x-process-sub-packages>
124 </target>
125
126 <target name="-before-clean-subpkgs"/>
127 <target name="-after-clean-subpkgs"/>
128 <target name="-clean-subpkgs">
129 <x-process-sub-packages>
130 <x-sub-build dir="@{pkg-dir}"
131 target="clean"
132 inherit-version="${build.subpkgs.inherit.version}"/>
133 </x-process-sub-packages>
134 </target>
135
136 <target name="-before-upgrade-subpkgs"/>
137 <target name="-after-upgrade-subpkgs"/>
138 <target name="-upgrade-subpkgs">
139 <x-process-sub-packages all="true">
140 <x-sencha-command dir="@{pkg-dir}" inheritall="false">
141 <property name="args.force" value="true"/>
142 package
143 upgrade
144 </x-sencha-command>
145 <delete dir="@{example-dir}/.sencha_backup"/>
146 </x-process-sub-packages>
147 </target>
148
149 <target name="-before-examples"/>
150 <target name="-after-examples"/>
151 <target name="-examples">
152 <x-process-examples>
153 <echo>Building example in @{example-dir}</echo>
154 <x-sencha-command dir="@{example-dir}" inheritall="false">
155 app
156 build
157 </x-sencha-command>
158 </x-process-examples>
159 </target>
160
161 <target name="-before-upgrade-examples"/>
162 <target name="-after-upgrade-examples"/>
163 <target name="-upgrade-examples">
164 <x-process-examples all="true">
165 <echo>Upgrading example in @{example-dir}</echo>
166 <x-sencha-command dir="@{example-dir}" inheritall="false">
167 <property name="args.force" value="true"/>
168 app
169 upgrade
170 </x-sencha-command>
171 <delete dir="@{example-dir}/.sencha_backup"/>
172 </x-process-examples>
173 </target>
174
175 <target name="-before-clean-examples"/>
176 <target name="-after-clean-examples"/>
177 <target name="-clean-examples">
178 <x-process-examples all="true">
179 <echo>Cleaning example in @{example-dir}</echo>
180 <x-sub-build dir="@{example-dir}"
181 target="clean"/>
182 </x-process-examples>
183 </target>
184
185 </project>
...\ No newline at end of file ...\ No newline at end of file
1 # ===========================================
2 # This file defines properties used by
3 # build-impl.xml, which is the base impl
4 # of an applications build process. The
5 # properties from this file correspond to the
6 # 'testing' build environment, specified
7 # by 'sencha app build testing'. These will
8 # take precedence over defaults provided by
9 # build.properties.
10 # ===========================================
11
12 # ===========================================
13 # compression option used to generate '-all'
14 # js output file. this value disables
15 # compression for testing builds
16 # ===========================================
17 build.compile.js.compress=
1 <?xml version="1.0" encoding="utf-8"?>
2 <project name="ext-theme-crisp-touch" default=".help">
3 <!--
4 The build-impl.xml file imported here contains the guts of the build process. It is
5 a great idea to read that file to understand how the process works, but it is best to
6 limit your changes to this file.
7 -->
8 <import file="${basedir}/.sencha/package/build-impl.xml"/>
9
10 <!--
11 The following targets can be provided to inject logic before and/or after key steps
12 of the build process:
13
14 The "init-local" target is used to initialize properties that may be personalized
15 for the local machine.
16
17 <target name="-before-init-local"/>
18 <target name="-after-init-local"/>
19
20 The "clean" target is used to clean build output from the build.dir.
21
22 <target name="-before-clean"/>
23 <target name="-after-clean"/>
24
25 The general "init" target is used to initialize all other properties, including
26 those provided by Sencha Cmd.
27
28 <target name="-before-init"/>
29 <target name="-after-init"/>
30
31 The "build" target performs the call to Sencha Cmd to build the application.
32
33 <target name="-before-build"/>
34 <target name="-after-build"/>
35 -->
36
37 </project>
1 require '../../ext-theme-base/sass/utils.rb'
2 require '../sass/config.rb'
1 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 ...\ No newline at end of file
1 # ext-theme-crisp-touch/resources
2
3 This folder contains static resources (typically an `"images"` folder as well).
1 @import 'ext-theme-crisp-touch-all-rtl-debug_01.css';
2 @import 'ext-theme-crisp-touch-all-rtl-debug_02.css';
1 @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 ...\ No newline at end of file