1
|
??
|
2
|
< ! D O C T Y P E h t m l >
|
3
|
< h e a d >
|
4
|
< t i t l e > + n e f o < / t i t l e >
|
5
|
< ! - - i n c l u d e t h e T o o l s - - >
|
6
|
< ! - - j q u e r y t o o l s m i n i f i e d f o r d e p l o y m e n t - - >
|
7
|
< s c r i p t s r c = " s t a t i c / j q u e r y . t o o l s . m i n . j s " > < / s c r i p t >
|
8
|
< ! - - j q u e r y t o o l s s o u r c e f o r J S d e b u g g i n g - - >
|
9
|
< ! - -
|
10
|
< s c r i p t s r c = " h t t p : / / f l o w p l a y e r . o r g / t o o l s / d o w n l o a d / 1 . 2 . 5 / j q u e r y - 1 . 4 . 2 . j s " > < / s c r i p t >
|
11
|
< s c r i p t s r c = " h t t p : / / f l o w p l a y e r . o r g / t o o l s / d o w n l o a d / 1 . 2 . 5 / t a b s / t a b s . j s " > < / s c r i p t >
|
12
|
< s c r i p t s r c = " h t t p : / / f l o w p l a y e r . o r g / t o o l s / d o w n l o a d / 1 . 2 . 5 / s c r o l l a b l e / s c r o l l a b l e . j s " > < / s c r i p t >
|
13
|
< s c r i p t s r c = " h t t p : / / f l o w p l a y e r . o r g / t o o l s / d o w n l o a d / 1 . 2 . 5 / o v e r l a y / o v e r l a y . j s " > < / s c r i p t >
|
14
|
< s c r i p t s r c = " h t t p : / / f l o w p l a y e r . o r g / t o o l s / d o w n l o a d / 1 . 2 . 5 / r a n g e i n p u t / r a n g e i n p u t . j s " > < / s c r i p t >
|
15
|
< s c r i p t s r c = " h t t p : / / f l o w p l a y e r . o r g / t o o l s / d o w n l o a d / 1 . 2 . 5 / t o o l b o x / t o o l b o x . e x p o s e . j s " > < / s c r i p t >
|
16
|
- - >
|
17
|
< s c r i p t s r c = " s t a t i c / t e x t d r o p d o w n . j q u e r y . j s " > < / s c r i p t >
|
18
|
< s c r i p t s r c = " s t a t i c / j q u e r y . c o o k i e . j s " > < / s c r i p t >
|
19
|
< s c r i p t s r c = " s t a t i c / j Q u e r y R o t a t e . j s " > < / s c r i p t >
|
20
|
< s c r i p t s r c = " s t a t i c / j q u e r y . d a t a T a b l e s . m i n . j s " > < / s c r i p t >
|
21
|
< s c r i p t s r c = " s t a t i c / s y n n e f o . j s " > < / s c r i p t >
|
22
|
< l i n k r e l = " s t y l e s h e e t " t y p e = " t e x t / c s s " h r e f = " s t a t i c / m a i n . c s s " / >
|
23
|
< s c r i p t >
|
24
|
/ / t i m e o u t v a l u e f r o m s e t t i n g s . p y
|
25
|
v a r T I M E O U T = 1 0 0 0 0 ;
|
26
|
v a r U P D A T E _ I N T E R V A L = 5 0 0 0 ;
|
27
|
v a r S T A T U S _ M E S S A G E S = {
|
28
|
' B U I L D ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ' ,
|
29
|
' R E B O O T ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ' ,
|
30
|
' S T O P P E D ' : ' ? ? ? ? ? ? ? ? ? ? ? ' ,
|
31
|
' A C T I V E ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ' ,
|
32
|
' E R R O R ' : ' ? ? ? ? ? ? ! '
|
33
|
} ;
|
34
|
|
35
|
v a r T R A N S I T I O N _ M E S S A G E S = {
|
36
|
' S h u t t i n g d o w n ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ? ? ' ,
|
37
|
' R e b o o t i n g ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ' ,
|
38
|
' S t a r t i n g ' : ' ? ? ? ? ? ? ? ? ? ? ? ' ,
|
39
|
' D e s t r o y i n g ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ? ' ,
|
40
|
} ;
|
41
|
|
42
|
v a r E R R O R S = {
|
43
|
/ / e r r o r m e s s a g e h e a d e r
|
44
|
' H E A D E R ' : ' ? ? ? ? ? ? ! ' ,
|
45
|
/ / d e f a u l t
|
46
|
' D E F A U L T ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? . ' ,
|
47
|
/ / b a d r e q u e s t
|
48
|
' 4 0 0 ' : ' M a l f o r m e d r e q u e s t . ' ,
|
49
|
/ / n o t f o u n d
|
50
|
' 4 0 4 ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? . ' ,
|
51
|
/ / i n t e r n a l s e r v e r e r r o r
|
52
|
' 5 0 0 ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? . ' ,
|
53
|
/ / s e r v i c e u n a v a i l a b l e
|
54
|
' 5 0 1 ' : ' T h i s s e r v e r h a s n o t b e e n i m p l e m e n t e d y e t . ' ,
|
55
|
/ / s e r v i c e u n a v a i l a b l e
|
56
|
' 5 0 2 ' : ' B a d G a t e w a y e r r o r . ' ,
|
57
|
/ / s e r v i c e u n a v a i l a b l e
|
58
|
' 5 0 3 ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? , ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? . ' ,
|
59
|
/ / n o s e r v e r h a n d s h a k e
|
60
|
' 0 ' : ' C o u l d n o t c o n t a c t t h e s e r v e r . ' ,
|
61
|
/ / n o i m a g e s f o u n d
|
62
|
' N O _ I M A G E S ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? w i z a r d ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? : ? ? ? ? ? ? ? ? ? ? ? i m a g e s . ' ,
|
63
|
/ / n o f l a v o r s f o u n d
|
64
|
' N O _ F L A V O R S ' : ' C a n n o t s h o w t h e C r e a t e m a c h i n e w i z a r d : N o m a c h i n e c o n f i g u r a t i o n s f o u n d . ' ,
|
65
|
/ / n o f l a v o r s f o u n d
|
66
|
' G E N E R I C _ P O P U P _ H E A D E R ' : ' S o m e t h i n g s e e m s t o h a v e g o n e w r o n g : ( H e r e i s w h a t h a p p e n e d : '
|
67
|
} ;
|
68
|
|
69
|
v a r S U C C E S S = {
|
70
|
' H E A D E R ' : ' S u c c e s s ' ,
|
71
|
' D E F A U L T ' : ' ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? . ' ,
|
72
|
' P A S S W O R D ' : ' ? ? ? ? ? ? ? ? ? ? ? : ' ,
|
73
|
' C R E A T E _ V M _ S U C C E S S ' : ' ? ? ? ? ? ? ? ? ! ' ,
|
74
|
' C R E A T E _ V M _ S U C C E S S _ O N E ' : ' Y o u r n e w m a c h i n e i s n o w b u i d l i n g . . . ( t h i s m i g h t t a k e a f e w m i n u t e s ) ' ,
|
75
|
' C R E A T E _ V M _ S U C C E S S _ T W O ' : ' W r i t e d o w n y o u r p a s s w o r d n o w ! ' ,
|
76
|
' C R E A T E _ V M _ S U C C E S S _ T H R E E ' : ' Y o u w i l l n e e d t h i s l a t e r t o c o n n e c t t o y o u r m a c h i n e . ' ,
|
77
|
' C R E A T E _ V M _ S U C C E S S _ F O U R ' : ' A f t e r c l o s i n g t h i s w i n d o w y o u w i l l N O T b e a b l e t o r e t r i e v e i t a g a i n . '
|
78
|
} ;
|
79
|
|
80
|
/ / a j a x e r r o r c h e c k i n g
|
81
|
f u n c t i o n a j a x _ e r r o r ( s t a t u s , s e r v e r I D , a c t i o n , r e s p o n s e T e x t ) {
|
82
|
v a r s e r v e r N a m e = ' ' ;
|
83
|
|
84
|
i f ( s e r v e r I D ! = u n d e f i n e d ) {
|
85
|
/ / s t a n d a r d v i e w
|
86
|
s e r v e r N a m e = $ ( " # " + s e r v e r I D ) . f i n d ( " s p a n . n a m e " ) . t e x t ( ) ;
|
87
|
i f ( s e r v e r N a m e = = " " ) { / / l i s t v i e w
|
88
|
s e r v e r N a m e = $ ( " # " + s e r v e r I D ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " s p a n . n a m e " ) . t e x t ( ) ;
|
89
|
}
|
90
|
}
|
91
|
|
92
|
/ / p r e p a r e t h e e r r o r m e s s a g e
|
93
|
$ ( " # e r r o r - s u c c e s s h 3 " ) . t e x t ( E R R O R S [ ' H E A D E R ' ] ) ;
|
94
|
i f ( r e s p o n s e T e x t ! = u n d e f i n e d ) {
|
95
|
v a r e r r o r s = p a r s e _ e r r o r ( r e s p o n s e T e x t ) , d e t a i l s = ' ' ;
|
96
|
i f ( s e r v e r N a m e ) {
|
97
|
s e r v e r N a m e = " < p > ? ? ? ? ? ? ? ? ? ? : " + s e r v e r N a m e + " < / p > " ;
|
98
|
}
|
99
|
i f ( e r r o r s [ 0 ] . d e t a i l s ! = u n d e f i n e d ) {
|
100
|
d e t a i l s = e r r o r s [ 0 ] . d e t a i l s ;
|
101
|
}
|
102
|
/ / $ ( " # e r r o r - s u c c e s s d i v . p o p u p - b o d y - i n n e r " ) . h t m l ( " < p > " + ( e r r o r s [ 0 ] . m e s s a g e | | E R R O R S [ e r r o r s [ 0 ] . c o d e ] ) + " < / p > " + s e r v e r N a m e + " < p > < s t r o n g > ? ? ? ? ? ? ? ? : < / s t r o n g > " + a c t i o n + " < / p > < p > < s t r o n g > ? ? ? ? ? ? ? : < / s t r o n g > " + e r r o r s [ 0 ] . c o d e + " < / p > " + d e t a i l s ) ;
|
103
|
$ ( " # e r r o r - s u c c e s s . m a c h i n e - n o w - b u i l d i n g " ) . h t m l ( E R R O R S [ " G E N E R I C _ P O P U P _ H E A D E R " ] ) ;
|
104
|
$ ( " # e r r o r - s u c c e s s . p o p u p - h e a d e r " ) . a d d C l a s s ( " p o p u p - h e a d e r - e r r o r " ) ;
|
105
|
$ ( " # e r r o r - s u c c e s s " ) . a d d C l a s s ( " p o p u p - b o r d e r - e r r o r " ) ;
|
106
|
$ ( " # e r r o r - s u c c e s s . p a s s w o r d - c o n t a i n e r " ) . h i d e ( ) ;
|
107
|
$ ( " # e r r o r - s u c c e s s . p o p u p - d e t a i l s " ) . a d d C l a s s ( " p o p u p - d e t a i l s - e r r o r " ) ;
|
108
|
$ ( " # e r r o r - s u c c e s s . p o p u p - s e p a r a t o r " ) . a d d C l a s s ( " p o p u p - s e p a r a t o r - e r r o r " ) ;
|
109
|
$ ( " # e r r o r - s u c c e s s . p o p u p - d e t a i l s " ) . h t m l ( " < p > " + ( e r r o r s [ 0 ] . m e s s a g e | | E R R O R S [ e r r o r s [ 0 ] . c o d e ] ) + " < / p > " + s e r v e r N a m e + " < p > ? ? ? ? ? ? ? ? : " + a c t i o n + " < / p > < p > ? ? ? ? ? ? ? : " + e r r o r s [ 0 ] . c o d e + " < p > < a c l a s s = ' e x p a n d - d e t a i l s ' h r e f = ' # ' > ? ? ? ? ? ? ? ? ? ? ? < / a > < d i v c l a s s = ' m o r e - d e t a i l s ' > " + d e t a i l s + " < / d i v > < / p > " ) ;
|
110
|
} e l s e i f ( E R R O R S [ s t a t u s ] ! = u n d e f i n e d ) {
|
111
|
i f ( s e r v e r I D = = u n d e f i n e d ) {
|
112
|
$ ( " # e r r o r - s u c c e s s p " ) . t e x t ( E R R O R S [ s t a t u s ] ) ;
|
113
|
} e l s e {
|
114
|
$ ( " # e r r o r - s u c c e s s p " ) . h t m l ( " < b > " + s e r v e r N a m e + " < / b > " + " : " + E R R O R S [ s t a t u s ] ) ;
|
115
|
}
|
116
|
} e l s e {
|
117
|
$ ( " # e r r o r - s u c c e s s p " ) . t e x t ( E R R O R S [ ' D E F A U L T ' ] ) ;
|
118
|
}
|
119
|
$ ( " # e r r o r - s u c c e s s p : f i r s t " ) . c s s ( " p a d d i n g - b o t t o m " , " 1 0 p x " ) ;
|
120
|
$ ( " # e r r o r - s u c c e s s p : f i r s t " ) . c s s ( " c o l o r " , " # 8 0 0 0 0 0 " ) ;
|
121
|
$ ( " # e r r o r - s u c c e s s d i v . m o r e - d e t a i l s " ) . h i d e ( ) ;
|
122
|
$ ( " # e r r o r - s u c c e s s a . e x p a n d - d e t a i l s " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
123
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " d i v . m o r e - d e t a i l s " ) . s l i d e T o g g l e ( 6 0 0 ) ;
|
124
|
r e t u r n f a l s e ;
|
125
|
} ) ;
|
126
|
/ / s t o p t h e p r o g r e s s i c o n a n d h i d e t h e w i z a r d
|
127
|
i f ( a c t i o n ! = u n d e f i n e d ) {
|
128
|
i f ( a c t i o n = = ' C r e a t e V M ' ) {
|
129
|
$ ( ' # w i z a r d # s t a r t ' ) . t e x t ( ' ? ? ? ? ? ? ? ? ? ? V M ' ) ;
|
130
|
$ ( " # w i z a r d " ) . h i d e ( ) ;
|
131
|
}
|
132
|
}
|
133
|
|
134
|
/ / b r i n g u p e r r o r n o t i f i c a t i o n
|
135
|
v a r t r i g g e r s = $ ( " a # n o t i f i c a t i o n " ) . o v e r l a y ( {
|
136
|
/ / s o m e m a s k t w e a k s s u i t a b l e f o r m o d a l d i a l o g s
|
137
|
m a s k : {
|
138
|
c o l o r : ' # e b e c f f ' ,
|
139
|
o p a c i t y : ' 0 . 9 '
|
140
|
} ,
|
141
|
t o p : ' c e n t e r ' ,
|
142
|
c l o s e O n C l i c k : f a l s e ,
|
143
|
o n e I n s t a n c e : f a l s e ,
|
144
|
l o a d : f a l s e ,
|
145
|
o n C l o s e : f u n c t i o n ( ) {
|
146
|
/ / W i t h p a r t i a l r e f r e s h w o r k i n g p r o p e r l y ,
|
147
|
/ / i t i s n o l o n g e r n e c e s s a r y t o r e f r e s h t h e w h o l e p a g e
|
148
|
/ / c h o o s e _ v i e w ( ) ;
|
149
|
}
|
150
|
} ) ;
|
151
|
$ ( " a # n o t i f i c a t i o n " ) . d a t a ( ' o v e r l a y ' ) . l o a d ( ) ;
|
152
|
r e t u r n f a l s e ;
|
153
|
}
|
154
|
|
155
|
/ / a j a x s u c c e s s c h e c k i n g
|
156
|
f u n c t i o n a j a x _ s u c c e s s ( s t a t u s , p a s s w o r d ) {
|
157
|
/ / p r e p a r e t h e e r r o r m e s s a g e
|
158
|
/ / b r i n g u p s u c c e s s n o t i f i c a t i o n
|
159
|
i f ( s t a t u s ! = u n d e f i n e d & & S U C C E S S [ s t a t u s ] ) {
|
160
|
i f ( p a s s w o r d ! = u n d e f i n e d & & s t a t u s = = " C R E A T E _ V M _ S U C C E S S " ) {
|
161
|
|
162
|
/ / s t o p t h e p r o g r e s s i c o n a n d h i d e t h e w i z a r d
|
163
|
$ ( ' # w i z a r d # s t a r t ' ) . t e x t ( ' ? ? ? ? ? ? ? ? ? ? V M ' ) ;
|
164
|
$ ( " # w i z a r d " ) . h i d e ( ) ;
|
165
|
|
166
|
$ ( " # e r r o r - s u c c e s s h 3 " ) . t e x t ( S U C C E S S [ s t a t u s ] ) ;
|
167
|
v a r C R E A T E _ V M _ S U C C E S S _ M S G = S U C C E S S [ " C R E A T E _ V M _ S U C C E S S _ T H R E E " ] + ' < b r / > '
|
168
|
+ S U C C E S S [ " C R E A T E _ V M _ S U C C E S S _ F O U R " ] ;
|
169
|
$ ( " # e r r o r - s u c c e s s d i v . m a c h i n e - n o w - b u i l d i n g " ) . h t m l ( S U C C E S S [ " C R E A T E _ V M _ S U C C E S S _ O N E " ] ) ;
|
170
|
$ ( " # e r r o r - s u c c e s s . p o p u p - h e a d e r " ) . r e m o v e C l a s s ( " p o p u p - h e a d e r - e r r o r " ) ;
|
171
|
$ ( " # e r r o r - s u c c e s s " ) . r e m o v e C l a s s ( " p o p u p - b o r d e r - e r r o r " ) ;
|
172
|
$ ( " # e r r o r - s u c c e s s . p o p u p - d e t a i l s " ) . r e m o v e C l a s s ( " p o p u p - d e t a i l s - e r r o r " ) ;
|
173
|
$ ( " # e r r o r - s u c c e s s . p o p u p - s e p a r a t o r " ) . r e m o v e C l a s s ( " p o p u p - s e p a r a t o r - e r r o r " ) ;
|
174
|
$ ( " # e r r o r - s u c c e s s . p a s s w o r d - c o n t a i n e r " ) . s h o w ( ) ;
|
175
|
$ ( " # e r r o r - s u c c e s s . p o p u p - d e t a i l s " ) . h t m l ( " < d i v c l a s s = \ " w r i t e - p a s s w o r d \ " > " + S U C C E S S [ " C R E A T E _ V M _ S U C C E S S _ T W O " ] + " < / d i v > < d i v c l a s s = \ " w r i t e - p a s s w o r d - d e t a i l s \ " > " + C R E A T E _ V M _ S U C C E S S _ M S G + " < / d i v > " ) ;
|
176
|
$ ( " # e r r o r - s u c c e s s d i v . p a s s w o r d " ) . h t m l ( p a s s w o r d ) ;
|
177
|
/ / $ ( " # e r r o r - s u c c e s s d i v . w r i t e - p a s s w o r d " ) . h t m l ( S U C C E S S [ " C R E A T E _ V M _ S U C C E S S _ T W O " ] ) ;
|
178
|
/ / $ ( " # e r r o r - s u c c e s s d i v . w r i t e - p a s s w o r d - d e t a i l s " ) . h t m l ( C R E A T E _ V M _ S U C C E S S _ M S G ) ;
|
179
|
} e l s e {
|
180
|
$ ( " # e r r o r - s u c c e s s h 3 " ) . t e x t ( S U C C E S S [ ' H E A D E R ' ] ) ;
|
181
|
$ ( " # e r r o r - s u c c e s s d i v . p o p u p - b o d y - i n n e r " ) . t e x t ( " < p > " + S U C C E S S [ s t a t u s ] + " < / p > " ) ;
|
182
|
}
|
183
|
} e l s e {
|
184
|
$ ( " # e r r o r - s u c c e s s h 3 " ) . t e x t ( S U C C E S S [ ' H E A D E R ' ] ) ;
|
185
|
$ ( " # e r r o r - s u c c e s s d i v . p o p u p - b o d y - i n n e r " ) . h t m l ( " < p > " + S U C C E S S [ ' D E F A U L T ' ] + " < / p > " ) ;
|
186
|
}
|
187
|
|
188
|
v a r t r i g g e r s = $ ( " a # n o t i f i c a t i o n " ) . o v e r l a y ( {
|
189
|
/ / s o m e m a s k t w e a k s s u i t a b l e f o r m o d a l d i a l o g s
|
190
|
m a s k : {
|
191
|
c o l o r : ' # e b e c f f ' ,
|
192
|
o p a c i t y : ' 0 . 9 '
|
193
|
} ,
|
194
|
t o p : ' c e n t e r ' ,
|
195
|
c l o s e O n C l i c k : f a l s e ,
|
196
|
o n e I n s t a n c e : f a l s e ,
|
197
|
l o a d : f a l s e ,
|
198
|
o n C l o s e : f u n c t i o n ( ) {
|
199
|
/ / W i t h p a r t i a l r e f r e s h w o r k i n g p r o p e r l y ,
|
200
|
/ / i t i s n o l o n g e r n e c e s s a r y t o r e f r e s h t h e w h o l e p a g e
|
201
|
/ / c h o o s e _ v i e w ( ) ;
|
202
|
}
|
203
|
} ) ;
|
204
|
$ ( " a # n o t i f i c a t i o n " ) . d a t a ( ' o v e r l a y ' ) . l o a d ( ) ;
|
205
|
r e t u r n f a l s e ;
|
206
|
}
|
207
|
< / s c r i p t >
|
208
|
< / h e a d >
|
209
|
< b o d y >
|
210
|
< d i v i d = " m i d d l e - c o n t a i n e r " >
|
211
|
< d i v i d = " w r a p p e r " >
|
212
|
< d i v i d = ' u s e r ' >
|
213
|
< a h r e f = " # " > ? ? ? ? ? ? ? < / a >
|
214
|
|
215
|
|
216
|
& n b s p ; | & n b s p ;
|
217
|
< a c l a s s = " c u r r e n t _ l a n g " > e l < / a >
|
218
|
|
219
|
& n b s p ; | & n b s p ;
|
220
|
< a h r e f = " / l a n g / ? l = e n " > e n < / a >
|
221
|
|
222
|
< / d i v >
|
223
|
< d i v i d = ' h e a d e r ' >
|
224
|
< d i v c l a s s = " h e a d e r - l o g o " >
|
225
|
< a h r e f = " / " >
|
226
|
< i m g s r c = " s t a t i c / o k e a n o s . p n g " a l t = " o k e a n o s " / >
|
227
|
< / a >
|
228
|
< / d i v >
|
229
|
< / d i v >
|
230
|
< ! - - t a b s - - >
|
231
|
< d i v c l a s s = " t a b - n a m e " > ? ? ? ? ? ? ? < / d i v >
|
232
|
< d i v c l a s s = " t a b - s e p a r a t o r " > < / d i v >
|
233
|
< u l c l a s s = " c s s - t a b s " >
|
234
|
< l i > < a h r e f = " m a c h i n e s " t i t l e = " ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? " c l a s s = " p r i m a r y " i d = " m a c h i n e s " >
|
235
|
< i m g s r c = " s t a t i c / m a c h i n e s - i c o n . p n g " / > < / a > < / l i > < d i v c l a s s = " t a b - s e p a r a t o r " > < / d i v >
|
236
|
< l i > < a h r e f = " n e t w o r k s " t i t l e = " c o n f i g u r e n e t w o r k i n g " c l a s s = " p r i m a r y " i d = " n e t w o r k s " >
|
237
|
< i m g s r c = " s t a t i c / n e t w o r k s - i c o n . p n g " / > < / a > < / l i > < d i v c l a s s = " t a b - s e p a r a t o r " > < / d i v >
|
238
|
< l i > < a h r e f = " d i s k s " t i t l e = " ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? " c l a s s = " p r i m a r y " i d = " d i s k s " >
|
239
|
< i m g s r c = " s t a t i c / d i s k s - i c o n . p n g " / > < / a > < / l i >
|
240
|
< / u l >
|
241
|
< d i v c l a s s = " c s s - p a n e s " >
|
242
|
< d i v i d = " m a c h i n e s - p a n e " c l a s s = " p a n e " s t y l e = " d i s p l a y : b l o c k " >
|
243
|
|
244
|
< d i v i d = " m a c h i n e s " c l a s s = " s e p a r a t o r " > < / d i v >
|
245
|
|
246
|
< ! - - t h e c r e a t e b u t t o n - - >
|
247
|
< d i v i d = " c r e a t e c o n t a i n e r " >
|
248
|
< d i v i d = " b e f o r e c r e a t e " s t y l e = " d i s p l a y : n o n e ; " > < / d i v >
|
249
|
< s p a n i d = " c r e a t e b o d y " > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? : < / s p a n > < b r / >
|
250
|
< a i d = " c r e a t e " r e l = " # w i z a r d " h r e f = " # " > ? ? ? ? ? ? ? ? ? ? + < / a >
|
251
|
< / d i v >
|
252
|
|
253
|
< ! - - c h a n g i n g b e t w e e n s t a n d a r d / l i s t v i e w - - >
|
254
|
< d i v i d = " v i e w - s e l e c t " >
|
255
|
< a i d = " s t a n d a r d " h r e f = " / m a c h i n e s / s t a n d a r d " > < / a >
|
256
|
< a i d = " l i s t " h r e f = " / m a c h i n e s / l i s t " > < / a >
|
257
|
< a i d = " s i n g l e " h r e f = " / m a c h i n e s / s i n g l e " > < / a >
|
258
|
< / d i v >
|
259
|
|
260
|
< d i v i d = " e m p t y m a c h i n e s l i s t " >
|
261
|
< h 1 i d = " w e l c o m e h e a d e r " > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ! < / h 1 >
|
262
|
< b r / >
|
263
|
< s p a n c l a s s = " w e l c o m e b o d y " > F r o m t h i s p a n e l y o u w i l l b e a b l e t o m a n a g e y o u r V i r t u a l M a c h i n e s ( V M s ) . I f y o u d o n ' t k n o w w h a t a V M i s : t a k e t h e < a h r e f = " # " > t o u r < / a > . < / s p a n >
|
264
|
< b r / >
|
265
|
< b r / >
|
266
|
< s p a n c l a s s = " w e l c o m e b o d y " > T h e p a n e l i s c u r r e n t l y e m p t y , b e c a u s e y o u d o n ' t h a v e a n y V M s y e t . Y o u c a n s t a r t b y c r e a t i n g y o u r n e w V M b y c l i c k i n g t h e b l u e b u t t o n o n t h e r i g h t . T h e w i z a r d w i l l g u i d e y o u t h r o u g h t h e w h o l e p r o c e s s . < / s p a n >
|
267
|
< b r / >
|
268
|
< b r / >
|
269
|
< s p a n c l a s s = " w e l c o m e f o o t e r " > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? , ? ? ? ? ? ? ? < a h r e f = " # " > ? ? ? < / a > . < / s p a n >
|
270
|
< / d i v >
|
271
|
|
272
|
< ! - - t h e f o r m - - >
|
273
|
< f o r m a c t i o n = " # " >
|
274
|
< ! - - s c r o l l a b l e r o o t e l e m e n t - - >
|
275
|
< d i v c l a s s = " m o d a l " i d = " w i z a r d " >
|
276
|
< ! - - s t a t u s b a r - - >
|
277
|
< u l i d = " s t a t u s " >
|
278
|
< l i c l a s s = " a c t i v e " >
|
279
|
< s p a n c l a s s = " h e a d e r n u m b e r " c l a s s = " f i r s t " > 1 < / s p a n >
|
280
|
< d i v c l a s s = " h e a d e r b o d y f i r s t " > I m a g e < / d i v >
|
281
|
< / l i >
|
282
|
< l i >
|
283
|
< s p a n c l a s s = " h e a d e r n u m b e r " > 2 < / s p a n >
|
284
|
< d i v c l a s s = " h e a d e r b o d y " > ? ? ? ? ? < / d i v >
|
285
|
< / l i >
|
286
|
< l i c l a s s = " t h i r d " >
|
287
|
< s p a n c l a s s = " h e a d e r n u m b e r " > 3 < / s p a n >
|
288
|
< d i v c l a s s = " h e a d e r b o d y " > ? ? ? ? ? < / d i v >
|
289
|
< / l i >
|
290
|
< / u l >
|
291
|
< ! - - s c r o l l a b l e i t e m s - - >
|
292
|
< d i v c l a s s = " i t e m s " >
|
293
|
< ! - - p a g e s - - >
|
294
|
< d i v c l a s s = " p a g e " >
|
295
|
< h 2 > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? < / h 2 >
|
296
|
< h r c l a s s = " t o p r u l e r " / >
|
297
|
< d i v i d = " t a b s c o n t a i n e r " >
|
298
|
< u l c l a s s = " t a b s " >
|
299
|
< l i > < a h r e f = " # " > s y s t e m i m a g e s < / a > < / l i >
|
300
|
< l i > < a h r e f = " # " > c u s t o m i m a g e s < / a > < / l i >
|
301
|
< / u l >
|
302
|
< / d i v >
|
303
|
< d i v c l a s s = " p a n e s " >
|
304
|
< l i i d = " i m a g e - t e m p l a t e " s t y l e = " d i s p l a y : n o n e " >
|
305
|
< l a b e l f o r = " i m a g e . i d " >
|
306
|
< a >
|
307
|
< d i v c l a s s = " i m a g e - c o n t a i n e r " >
|
308
|
< d i v c l a s s = " i m a g e " >
|
309
|
< i n p u t c l a s s = " r a d i o " t y p e = " r a d i o " n a m e = " i m a g e - i d " i d = " i m a g e - i d " / >
|
310
|
< i m g s r c = " " c l a s s = " i m a g e - l o g o " / >
|
311
|
< s t r o n g c l a s s = " i m a g e - t i t l e " > i m a g e . t i t l e < / s t r o n g >
|
312
|
< b r / >
|
313
|
< d i v c l a s s = " d e s c r i p t i o n - c o n t a i n e r " >
|
314
|
< s p a n c l a s s = " d e s c r i p t i o n " > i m a g e . d e s c r i p t i o n < / s p a n >
|
315
|
< s p a n i d = " s i z e " c l a s s = " s i z e " > ? ? M B < / s p a n > < s p a n c l a s s = " s i z e " > M B < / s p a n >
|
316
|
< / d i v >
|
317
|
< / d i v >
|
318
|
< / d i v >
|
319
|
< / a >
|
320
|
< / l a b e l >
|
321
|
< / l i >
|
322
|
< u l c l a s s = " p a n e " i d = " s t a n d a r d - i m a g e s " >
|
323
|
< ! - - s t a n d a r d i m a g e s - - >
|
324
|
< / u l >
|
325
|
< u l c l a s s = " p a n e " i d = " c u s t o m - i m a g e s " >
|
326
|
< ! - - c u s t o m i m a g e s - - >
|
327
|
< / u l >
|
328
|
< / d i v >
|
329
|
< h r c l a s s = " b o t t o m r u l e r " / >
|
330
|
< b u t t o n t y p e = " b u t t o n " c l a s s = " p r e v " i d = " c a n c e l " > ? ? ? ? ? < / b u t t o n >
|
331
|
< b u t t o n t y p e = " b u t t o n " c l a s s = " n e x t r i g h t " > ? ? ? ? ? ? ? < / b u t t o n >
|
332
|
< / d i v >
|
333
|
< d i v c l a s s = " p a g e " >
|
334
|
< h 2 > ? ? ? ? ? ? ? ? C P U , ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? < / h 2 >
|
335
|
< h r c l a s s = " t o p r u l e r " / >
|
336
|
< u l >
|
337
|
< l i i d = " m a c h i n e t y p e " >
|
338
|
< d i v c l a s s = " m a c h i n e - t y p e " >
|
339
|
< l a b e l f o r = " s m a l l " i d = " s m a l l " >
|
340
|
< i n p u t t y p e = " r a d i o " i d = " s m a l l " n a m e = " m a c h i n e - t y p e " v a l u e = " s m a l l " c h e c k e d = " t r u e " / >
|
341
|
< s p a n c l a s s = " t y p e b o d y " i d = " s m a l l - b o d y " > ? ? ? ? ? < / s p a n >
|
342
|
< / l a b e l >
|
343
|
< / d i v >
|
344
|
< d i v c l a s s = " m a c h i n e - t y p e " >
|
345
|
< l a b e l f o r = " m e d i u m " i d = " m e d i u m " >
|
346
|
< i n p u t t y p e = " r a d i o " i d = " m e d i u m " n a m e = " m a c h i n e - t y p e " v a l u e = " m e d i u m " / >
|
347
|
< s p a n c l a s s = " t y p e b o d y " i d = " m e d i u m - b o d y " > ? ? ? ? ? ? < / s p a n >
|
348
|
< / l a b e l >
|
349
|
< / d i v >
|
350
|
< d i v c l a s s = " m a c h i n e - t y p e " >
|
351
|
< l a b e l f o r = " l a r g e " i d = " l a r g e " >
|
352
|
< i n p u t t y p e = " r a d i o " i d = " l a r g e " n a m e = " m a c h i n e - t y p e " v a l u e = " l a r g e " / >
|
353
|
< s p a n c l a s s = " t y p e b o d y " i d = " l a r g e - b o d y " > ? ? ? ? ? ? < / s p a n >
|
354
|
< / l a b e l >
|
355
|
< / d i v >
|
356
|
< d i v c l a s s = " m a c h i n e - t y p e " >
|
357
|
< l a b e l f o r = " c u s t o m " i d = " c u s t o m " >
|
358
|
< i n p u t t y p e = " r a d i o " n a m e = " m a c h i n e - t y p e " i d = " c u s t o m " v a l u e = " l a r g e " / >
|
359
|
< s p a n c l a s s = " t y p e b o d y " i d = " c u s t o m - b o d y " > ? ? ? ? ? ? ? ? ? ? ? ? ? < / s p a n >
|
360
|
< / l a b e l >
|
361
|
< / d i v >
|
362
|
< / l i >
|
363
|
< d i v i d = " p a g e 2 - c o n t a i n e r " >
|
364
|
< l i c l a s s = " s l i d e r - c o n t a i n e r " >
|
365
|
< l a b e l > < s t r o n g c l a s s = " s l i d e r s " > C P U s < / s t r o n g > < / l a b e l >
|
366
|
< i n p u t t y p e = " r a n g e " i d = " c p u " s t y l e = " d i s p l a y : n o n e " / >
|
367
|
< i n p u t t y p e = " t e x t " c l a s s = " r a n g e " i d = " c p u - i n d i c a t o r " / >
|
368
|
< s p a n c l a s s = " u n i t s " > ? ? ? ? ? ? ? < / s p a n >
|
369
|
< / l i >
|
370
|
< l i c l a s s = " s l i d e r - c o n t a i n e r " >
|
371
|
< l a b e l > < s t r o n g c l a s s = " s l i d e r s " > ? ? ? ? ? < / s t r o n g > < / l a b e l >
|
372
|
< i n p u t t y p e = " r a n g e " i d = " r a m " s t y l e = " d i s p l a y : n o n e " / >
|
373
|
< i n p u t t y p e = " t e x t " c l a s s = " r a n g e " i d = " r a m - i n d i c a t o r " / >
|
374
|
< s p a n c l a s s = " u n i t s " > M B < / s p a n >
|
375
|
< / l i >
|
376
|
< l i c l a s s = " s l i d e r - c o n t a i n e r " >
|
377
|
< l a b e l > < s t r o n g c l a s s = " s l i d e r s " > ? ? ? ? ? ? ? < / s t r o n g > < / l a b e l >
|
378
|
< i n p u t t y p e = " r a n g e " i d = " s t o r a g e " s t y l e = " d i s p l a y : n o n e " / >
|
379
|
< i n p u t t y p e = " t e x t " c l a s s = " r a n g e " i d = " s t o r a g e - i n d i c a t o r " / >
|
380
|
< s p a n c l a s s = " u n i t s " > G B < / s p a n >
|
381
|
< / l i >
|
382
|
< l i >
|
383
|
< d i v c l a s s = " c o s t " >
|
384
|
< s p a n > ? ? ? ? ? ? ? ? ? ? ? ? ? ? : 1 0 , 0 0 0 ? ? ? ? ? ? ? < / s p a n > | < s p a n > ? ? ? ? ? ? ? ? ? ? ? ? ? : < i n p u t t y p e = " t e x t " i d = " c r e d i t s - i n d i c a t o r " v a l u e = " 2 0 " c l a s s = " r a n g e " d i s a b l e d = " d i s a b l e d " / > C / h o u r < / s p a n >
|
385
|
< / d i v >
|
386
|
< / l i >
|
387
|
< / d i v >
|
388
|
< / u l >
|
389
|
< h r c l a s s = " b o t t o m r u l e r " / >
|
390
|
< b u t t o n t y p e = " b u t t o n " c l a s s = " p r e v " > ? ? ? ? < / b u t t o n >
|
391
|
< b u t t o n t y p e = " b u t t o n " c l a s s = " n e x t r i g h t " > ? ? ? ? ? ? ? < / b u t t o n >
|
392
|
< / d i v >
|
393
|
< d i v c l a s s = " p a g e " >
|
394
|
< h 2 > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? < / h 2 >
|
395
|
< h r c l a s s = " t o p r u l e r " / >
|
396
|
< u l i d = " p a g e 3 - c o n t a i n e r " >
|
397
|
< l i c l a s s = " r e q u i r e d " i d = " l a b e l - n a m e " >
|
398
|
< l a b e l >
|
399
|
< s t r o n g > ? ? ? ? ? : < / s t r o n g >
|
400
|
< i n p u t t y p e = " t e x t " c l a s s = " t e x t " n a m e = " m a c h i n e _ n a m e " i d = " n a m e " v a l u e = " M y U b u n t u 1 0 . 0 4 x 8 6 _ 6 4 s e r v e r " / >
|
401
|
< / l a b e l >
|
402
|
< / l i >
|
403
|
< l i >
|
404
|
< s p a n > I m a g e : < / s p a n > < s p a n i d = " m a c h i n e _ i m a g e - l a b e l " > U b u n t u 1 0 . 0 4 x 8 6 _ 6 4 s e r v e r < / s p a n >
|
405
|
< / l i >
|
406
|
< l i >
|
407
|
< s p a n > C P U s : < / s p a n > < s p a n i d = " m a c h i n e _ c p u - l a b e l " > 2 < / s p a n > < s p a n > ? ? ? ? ? ? ? < / s p a n >
|
408
|
< / l i >
|
409
|
< l i >
|
410
|
< s p a n > R A M : < / s p a n > < s p a n i d = " m a c h i n e _ r a m - l a b e l " > 1 0 2 4 < / s p a n > < s p a n > M B < / s p a n >
|
411
|
< / l i >
|
412
|
< l i >
|
413
|
< s p a n > S y s t e m D i s k : < / s p a n > < s p a n i d = " m a c h i n e _ s t o r a g e - l a b e l " > 1 0 < / s p a n > < s p a n > G B < / s p a n >
|
414
|
< / l i >
|
415
|
< l i >
|
416
|
< s p a n > ? ? ? ? ? ? ? ? ? ? ? ? : < / s p a n > < s p a n > 4 0 ? ? ? ? ? ? ? < / s p a n >
|
417
|
< / l i >
|
418
|
< l i >
|
419
|
< s p a n > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? : < / s p a n > < s p a n > 1 0 . 0 0 0 < / s p a n >
|
420
|
< / l i >
|
421
|
< / u l >
|
422
|
< h r c l a s s = " b o t t o m r u l e r " / >
|
423
|
< b u t t o n t y p e = " b u t t o n " c l a s s = " p r e v " > ? ? ? ? < / b u t t o n >
|
424
|
< b u t t o n t y p e = " b u t t o n " c l a s s = " n e x t r i g h t " i d = " s t a r t " > ? ? ? ? ? ? ? ? ? ? V M < / b u t t o n >
|
425
|
< / d i v >
|
426
|
< / d i v >
|
427
|
< d i v c l a s s = " s e p a r a t o r - e n d " > < / d i v >
|
428
|
< / d i v >
|
429
|
< / f o r m >
|
430
|
|
431
|
< ! - - m e t a d a t a o v e r l a y - - >
|
432
|
< d i v >
|
433
|
< d i v i d = " m e t a d a t a - w i z a r d " c l a s s = " m o d a l " >
|
434
|
< h 3 c l a s s = " p o p u p - h e a d e r " > M a n a g e T a g s < / h 3 >
|
435
|
< p s t y l e = ' d i s p l a y : n o n e ; ' > h i d d e n s e r v e r i d < / p >
|
436
|
< d i v c l a s s = " p o p u p - b o d y " >
|
437
|
< d i v c l a s s = " p o p u p - b o d y - i n n e r " >
|
438
|
< d i v c l a s s = " p o p u p - t i t l e " > C r e a t e , e d i t a n d d e l e t e T a g s f o r m a c h i n e : < / d i v > < i m g s r c = " " c l a s s = " m a c h i n e - i c o n " / > < d i v c l a s s = " m a c h i n e - n a m e " > < / d i v >
|
439
|
< d i v c l a s s = " p o p u p - s e p a r a t o r " > < / d i v >
|
440
|
< d i v c l a s s = " m e t a d a t a - c o n t a i n e r " >
|
441
|
|
442
|
< / d i v >
|
443
|
< d i v c l a s s = " m e t a d a t a - a d d - t e m p l a t e " s t y l e = " d i s p l a y : n o n e ; " >
|
444
|
< i n p u t t y p e = " t e x t " i d = " a d d - m e t a - k e y " m a x l e n g t h = " 1 5 " > < / i n p u t >
|
445
|
< u l >
|
446
|
|
447
|
< / u l >
|
448
|
< i n p u t t y p e = " t e x t " i d = " a d d - m e t a - v a l u e " m a x l e n g t h = " 1 5 0 " v a l u e = " 1 5 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? " > < / i n p u t >
|
449
|
< d i v c l a s s = " a d d b u t t o n s " >
|
450
|
< s p a n c l a s s = " s a v e " / >
|
451
|
< s p a n c l a s s = " c a n c e l " / >
|
452
|
< / d i v >
|
453
|
< / d i v >
|
454
|
< d i v c l a s s = " m e t a d a t a - p a i r - t e m p l a t e " s t y l e = " d i s p l a y : n o n e ; " >
|
455
|
< d i v c l a s s = " m e t a d a t a - k e y " > ? ? < / d i v >
|
456
|
< d i v c l a s s = " v e r t i c a l - s e p a r a t o r " > < / d i v >
|
457
|
< d i v c l a s s = " m e t a d a t a - v a l u e " > D e b i a n < / d i v >
|
458
|
< d i v c l a s s = " m e t a d a t a - f u l l - v a l u e " s t y l e = " d i s p l a y : n o n e ; " > < / d i v >
|
459
|
< d i v c l a s s = " m e t a d a t a - e d i t " >
|
460
|
< s p a n c l a s s = " e d i t " / >
|
461
|
< s p a n c l a s s = " r e m o v e " / >
|
462
|
< / d i v >
|
463
|
< d i v c l a s s = " e d i t b u t t o n s " s t y l e = " d i s p l a y : n o n e ; " >
|
464
|
< s p a n c l a s s = " s a v e " / >
|
465
|
< s p a n c l a s s = " r e m o v e " / >
|
466
|
< / d i v >
|
467
|
< / d i v >
|
468
|
< / d i v >
|
469
|
< / d i v >
|
470
|
< d i v c l a s s = " b u t t o n s " >
|
471
|
< b u t t o n t y p e = " b u t t o n " c l a s s = " s a v e " i d = " m e t a d a t a - c a n c e l " > ? ? ? ? ? ? ? ? < / b u t t o n >
|
472
|
< b u t t o n t y p e = " b u t t o n " c l a s s = " c r e a t e " i d = " m e t a d a t a - c r e a t e " > C r e a t e N e w < / b u t t o n >
|
473
|
< / d i v >
|
474
|
< / d i v >
|
475
|
< / d i v >
|
476
|
|
477
|
< a i d = " m e t a d a t a - s c r o l l a b l e " h r e f = " # " r e l = " # m e t a d a t a - w i z a r d " > < / a >
|
478
|
|
479
|
< d i v i d = " m a c h i n e s v i e w " > < / d i v >
|
480
|
|
481
|
< d i v c l a s s = " c o n f i r m _ m u l t i p l e " >
|
482
|
< p > Y o u r a c t i o n s w i l l a f f e c t < s p a n c l a s s = " a c t i o n L e n " > X X < / s p a n > ? ? ? ? ? ? ? < / p >
|
483
|
< b u t t o n c l a s s = " y e s " > ? ? ? ? ? ? ? ? ? ? ? ? < / b u t t o n >
|
484
|
< b u t t o n c l a s s = " n o " > ? ? ? ? ? < / b u t t o n >
|
485
|
< / d i v >
|
486
|
|
487
|
< s c r i p t >
|
488
|
|
489
|
/ / a d d h o v e r t o l a b e l s
|
490
|
$ ( ' # m a c h i n e s - p a n e s p a n . t y p e b o d y ' ) . m o u s e o v e r ( f u n c t i o n ( ) {
|
491
|
$ ( t h i s ) . a d d C l a s s ( ' t y p e h o v e r ' ) ;
|
492
|
} ) ;
|
493
|
$ ( ' # m a c h i n e s - p a n e s p a n . t y p e b o d y ' ) . m o u s e o u t ( f u n c t i o n ( ) {
|
494
|
$ ( t h i s ) . r e m o v e C l a s s ( ' t y p e h o v e r ' ) ;
|
495
|
} ) ;
|
496
|
|
497
|
/ / r e t u r n v a l u e f r o m m e t a d a t a k e y " O S " , i f i t e x i s t s
|
498
|
f u n c t i o n o s _ i c o n ( m e t a d a t a ) {
|
499
|
i f ( ! m e t a d a t a ) {
|
500
|
r e t u r n ' u n k n o w n ' ;
|
501
|
}
|
502
|
|
503
|
i f ( m e t a d a t a . v a l u e s . O S = = u n d e f i n e d | | m e t a d a t a . v a l u e s . O S = = ' ' ) {
|
504
|
r e t u r n ' u n k n o w n ' ;
|
505
|
} e l s e {
|
506
|
i f ( o s _ i c o n s . i n d e x O f ( m e t a d a t a . v a l u e s . O S ) = = - 1 ) {
|
507
|
r e t u r n ' u n k n o w n ' ;
|
508
|
} e l s e {
|
509
|
r e t u r n m e t a d a t a . v a l u e s . O S ;
|
510
|
}
|
511
|
}
|
512
|
}
|
513
|
|
514
|
f u n c t i o n o s _ i c o n _ f r o m _ v a l u e ( m e t a d a t a ) {
|
515
|
i f ( ! m e t a d a t a ) {
|
516
|
r e t u r n ' u n k n o w n ' ;
|
517
|
}
|
518
|
i f ( m e t a d a t a = = u n d e f i n e d | | m e t a d a t a = = ' ' ) {
|
519
|
r e t u r n ' u n k n o w n ' ;
|
520
|
} e l s e {
|
521
|
i f ( o s _ i c o n s . i n d e x O f ( m e t a d a t a ) = = - 1 ) {
|
522
|
r e t u r n ' u n k n o w n ' ;
|
523
|
} e l s e {
|
524
|
r e t u r n m e t a d a t a ;
|
525
|
}
|
526
|
}
|
527
|
}
|
528
|
|
529
|
/ / s w i t c h t o l i s t v i e w
|
530
|
$ ( " # m a c h i n e s - p a n e a # l i s t " ) . c l i c k ( f u n c t i o n ( ) {
|
531
|
l i s t _ v i e w ( ) ;
|
532
|
r e t u r n f a l s e ;
|
533
|
} ) ;
|
534
|
|
535
|
/ / s w i t c h t o s t a n d a r d v i e w
|
536
|
$ ( " # m a c h i n e s - p a n e a # s t a n d a r d " ) . c l i c k ( f u n c t i o n ( ) {
|
537
|
s t a n d a r d _ v i e w ( ) ;
|
538
|
r e t u r n f a l s e ;
|
539
|
} ) ;
|
540
|
|
541
|
/ / s w i t c h t o s i n g l e v i e w
|
542
|
$ ( " # m a c h i n e s - p a n e a # s i n g l e " ) . c l i c k ( f u n c t i o n ( ) {
|
543
|
s i n g l e _ v i e w ( ) ;
|
544
|
r e t u r n f a l s e ;
|
545
|
} ) ;
|
546
|
|
547
|
/ / l a u n c h V M c r e a t i o n w i z a r d
|
548
|
$ ( " # m a c h i n e s - p a n e a # c r e a t e " ) . c l i c k ( f u n c t i o n ( ) {
|
549
|
/ / l a u n c h w i z a r d o n l y i f i m a g e s a n d f l a v o r s a r e f o u n d
|
550
|
i f ( i m a g e s . l e n g t h > 0 & & f l a v o r s . l e n g t h > 0 ) {
|
551
|
$ ( " # w i z a r d " ) . s c r o l l a b l e ( ) . b e g i n ( ) ;
|
552
|
$ ( " # w i z a r d " ) . s h o w ( ) ;
|
553
|
$ ( ' # m a c h i n e s - p a n e a # c r e a t e ' ) . d a t a ( ' o v e r l a y ' ) . l o a d ( )
|
554
|
} e l s e i f ( i m a g e s . l e n g t h = = 0 ) {
|
555
|
a j a x _ e r r o r ( ' N O _ I M A G E S ' ) ;
|
556
|
r e t u r n f a l s e ;
|
557
|
} e l s e i f ( f l a v o r s . l e n g t h = = 0 ) {
|
558
|
a j a x _ e r r o r ( ' N O _ F L A V O R S ' ) ;
|
559
|
r e t u r n f a l s e ;
|
560
|
}
|
561
|
} ) ;
|
562
|
|
563
|
/ / c r e a t e w i z a r d o v e r l a y
|
564
|
$ ( f u n c t i o n ( ) {
|
565
|
$ ( " # m a c h i n e s - p a n e a # c r e a t e " ) . o v e r l a y ( {
|
566
|
m a s k : ' # 0 0 0 ' ,
|
567
|
e f f e c t : ' d e f a u l t ' ,
|
568
|
t o p : ' 5 % ' ,
|
569
|
o n e I n s t a n c e : f a l s e ,
|
570
|
c l o s e O n C l i c k : f a l s e
|
571
|
} ) ;
|
572
|
} ) ;
|
573
|
|
574
|
/ / w i z a r d
|
575
|
$ ( f u n c t i o n ( ) {
|
576
|
v a r r o o t = $ ( " # w i z a r d " ) . s c r o l l a b l e ( ) ;
|
577
|
v a r a p i = r o o t . s c r o l l a b l e ( ) ;
|
578
|
/ / r a n g e i n p u t w i t h d e f a u l t c o n f i g u r a t i o n
|
579
|
/ / v a l i d a t i o n l o g i c i s d o n e i n s i d e t h e o n B e f o r e S e e k c a l l b a c k
|
580
|
a p i . o n B e f o r e S e e k ( f u n c t i o n ( e v e n t , i ) {
|
581
|
/ / w e a r e g o i n g 1 s t e p b a c k w a r d s s o n o n e e d f o r v a l i d a t i o n
|
582
|
i f ( a p i . g e t I n d e x ( ) < i ) {
|
583
|
/ / 1 . g e t c u r r e n t p a g e
|
584
|
v a r p a g e = r o o t . f i n d ( " . p a g e " ) . e q ( a p i . g e t I n d e x ( ) ) ,
|
585
|
/ / 2 . . . a n d a l l r e q u i r e d f i e l d s i n s i d e t h e p a g e
|
586
|
i n p u t s = p a g e . f i n d ( " . r e q u i r e d : i n p u t " ) . r e m o v e C l a s s ( " e r r o r " ) ,
|
587
|
/ / 3 . . . w h i c h a r e e m p t y
|
588
|
e m p t y = i n p u t s . f i l t e r ( f u n c t i o n ( ) {
|
589
|
r e t u r n $ ( t h i s ) . v a l ( ) . r e p l a c e ( / \ s * / g , ' ' ) = = ' ' ;
|
590
|
} ) ;
|
591
|
/ / i f t h e r e a r e e m p t y f i e l d s , t h e n
|
592
|
i f ( e m p t y . l e n g t h ) {
|
593
|
/ / a d d a C S S c l a s s n a m e " e r r o r " f o r e m p t y & r e q u i r e d f i e l d s
|
594
|
e m p t y . a d d C l a s s ( " e r r o r " ) ;
|
595
|
/ / c a n c e l s e e k i n g o f t h e s c r o l l a b l e b y r e t u r n i n g f a l s e
|
596
|
r e t u r n f a l s e ;
|
597
|
/ / e v e r y t h i n g i s g o o d
|
598
|
}
|
599
|
}
|
600
|
/ / u p d a t e c o n f i r m s t e p
|
601
|
i f ( a p i . g e t I n d e x ( ) = = 0 ) {
|
602
|
v a r i m a g e = $ ( " i n p u t [ t y p e = r a d i o ] [ n a m e = i m a g e - i d ] : c h e c k e d " ) ;
|
603
|
v a r i m a g e R e f = i m a g e . l e n g t h ? i m a g e [ 0 ] . i d : f a l s e
|
604
|
i f ( i m a g e R e f ) {
|
605
|
v a r i m a g e N a m e = $ ( " l a b e l [ f o r = " + i m a g e R e f + " ] . i m a g e - t i t l e " ) . t e x t ( ) ;
|
606
|
$ ( " # m a c h i n e _ i m a g e - l a b e l " ) [ 0 ] . t e x t C o n t e n t = i m a g e N a m e ;
|
607
|
$ ( " i n p u t [ t y p e = t e x t ] [ n a m e = m a c h i n e _ n a m e ] " ) [ 0 ] . v a l u e = " M y " + i m a g e N a m e + " s e r v e r " ;
|
608
|
}
|
609
|
} e l s e i f ( a p i . g e t I n d e x ( ) = = 1 ) {
|
610
|
$ ( " # m a c h i n e _ c p u - l a b e l " ) [ 0 ] . t e x t C o n t e n t = $ ( " # c p u - i n d i c a t o r " ) [ 0 ] . v a l u e ;
|
611
|
$ ( " # m a c h i n e _ r a m - l a b e l " ) [ 0 ] . t e x t C o n t e n t = $ ( " # r a m - i n d i c a t o r " ) [ 0 ] . v a l u e ;
|
612
|
$ ( " # m a c h i n e _ s t o r a g e - l a b e l " ) [ 0 ] . t e x t C o n t e n t = $ ( " # s t o r a g e - i n d i c a t o r " ) [ 0 ] . v a l u e ;
|
613
|
}
|
614
|
} ) ;
|
615
|
a p i . o n S e e k ( f u n c t i o n ( e v e n t , i ) {
|
616
|
/ / u p d a t e s t a t u s b a r
|
617
|
$ ( " # s t a t u s l i " ) . r e m o v e C l a s s ( " a c t i v e " ) . e q ( i ) . a d d C l a s s ( " a c t i v e " ) ;
|
618
|
} ) ;
|
619
|
/ / i f t a b i s p r e s s e d o n t h e n e x t b u t t o n s e e k t o n e x t p a g e
|
620
|
$ ( r o o t ) . l i v e ( ' k e y d o w n ' , f u n c t i o n ( e ) {
|
621
|
i f ( e . k e y C o d e = = 9 ) {
|
622
|
i f ( e . p r e v e n t D e f a u l t ) {
|
623
|
e . p r e v e n t D e f a u l t ( ) ;
|
624
|
}
|
625
|
a p i . n e x t ( ) ;
|
626
|
}
|
627
|
} ) ;
|
628
|
/ / s u b m i t w i z a r d b y p r e s s i n g e n t e r o n t h e n a m e t e x t b o x
|
629
|
$ ( " # n a m e " ) . k e y p r e s s ( f u n c t i o n ( e ) {
|
630
|
i f ( ( e . w h i c h & & e . w h i c h = = 1 3 ) | | ( e . k e y C o d e & & e . k e y C o d e = = 1 3 ) ) {
|
631
|
$ ( ' # s t a r t ' ) . c l i c k ( ) ;
|
632
|
r e t u r n f a l s e ;
|
633
|
} e l s e {
|
634
|
r e t u r n t r u e ;
|
635
|
}
|
636
|
} ) ;
|
637
|
} ) ;
|
638
|
|
639
|
/ / d i s a b l e s l i d e r s i n f l a v o r s e l e c t i o n
|
640
|
f u n c t i o n d i s a b l e S l i d e r s ( ) {
|
641
|
$ ( " # c p u " ) . a t t r ( ' d i s a b l e d ' , t r u e ) ;
|
642
|
$ ( " # r a m " ) . a t t r ( ' d i s a b l e d ' , t r u e ) ;
|
643
|
$ ( " # s t o r a g e " ) . a t t r ( ' d i s a b l e d ' , t r u e ) ;
|
644
|
}
|
645
|
|
646
|
/ / u p d a t e r a d i o b u t t o n w h e n c l i c k i n g o n t e x t
|
647
|
$ ( " # s m a l l - b o d y " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
648
|
$ ( t h i s ) . p a r e n t ( ) . f i n d ( " # s m a l l " ) . c l i c k ( ) ;
|
649
|
} ) ;
|
650
|
|
651
|
$ ( " # m e d i u m - b o d y " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
652
|
$ ( t h i s ) . p a r e n t ( ) . f i n d ( " # m e d i u m " ) . c l i c k ( ) ;
|
653
|
} ) ;
|
654
|
|
655
|
$ ( " # l a r g e - b o d y " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
656
|
$ ( t h i s ) . p a r e n t ( ) . f i n d ( " # l a r g e " ) . c l i c k ( ) ;
|
657
|
} ) ;
|
658
|
|
659
|
$ ( " # c u s t o m - b o d y " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
660
|
$ ( t h i s ) . p a r e n t ( ) . f i n d ( " # c u s t o m " ) . c l i c k ( ) ;
|
661
|
} ) ;
|
662
|
|
663
|
/ / s e l e c t i m a g e d i v o n r a d i o b u t t o n s e l e c t
|
664
|
$ ( ' # m a c h i n e s - p a n e . r a d i o ' ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
665
|
$ ( t h i s ) . p a r e n t s ( " d i v " ) . f i n d ( " . i m a g e " ) . r e m o v e C l a s s ( ' s e l e c t e d d i v ' ) ;
|
666
|
i f ( $ ( t h i s ) . i s ( ' : c h e c k e d ' ) ) {
|
667
|
$ ( t h i s ) . p a r e n t ( ) . a d d C l a s s ( ' s e l e c t e d d i v ' ) ;
|
668
|
}
|
669
|
} ) ;
|
670
|
|
671
|
/ / v a l i d a t e c p u i n p u t b o x
|
672
|
$ ( " # c p u - i n d i c a t o r " ) . l i v e ( ' c h a n g e ' , f u n c t i o n ( ) {
|
673
|
v a r v = N u m b e r ( t h i s . v a l u e ) ;
|
674
|
v a r i = c p u s . i n d e x O f ( v ) ;
|
675
|
i f ( i s N a N ( v ) ) {
|
676
|
$ ( t h i s ) . v a l u e = c p u s [ 0 ] ;
|
677
|
$ ( " # c p u " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 0 ) ;
|
678
|
} e l s e i f ( i = = - 1 ) {
|
679
|
f o r ( v a r j = 0 ; j < c p u s . l e n g t h ; j + + )
|
680
|
i f ( v < c p u s [ j ] )
|
681
|
b r e a k ;
|
682
|
$ ( " # c p u " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( j ) ;
|
683
|
} e l s e {
|
684
|
$ ( " # c p u " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( i ) ;
|
685
|
}
|
686
|
r e t u r n f a l s e ;
|
687
|
} ) ;
|
688
|
|
689
|
/ / v a l i d a t e r a m i n p u t b o x
|
690
|
$ ( " # r a m - i n d i c a t o r " ) . l i v e ( ' c h a n g e ' , f u n c t i o n ( ) {
|
691
|
v a r v = N u m b e r ( t h i s . v a l u e ) ;
|
692
|
v a r i = r a m . i n d e x O f ( v ) ;
|
693
|
i f ( i s N a N ( v ) ) {
|
694
|
$ ( t h i s ) . v a l u e = c p u s [ 0 ] ;
|
695
|
$ ( " # r a m " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 0 ) ;
|
696
|
} e l s e i f ( i = = - 1 ) {
|
697
|
f o r ( v a r j = 0 ; j < r a m . l e n g t h ; j + + )
|
698
|
i f ( v < r a m [ j ] )
|
699
|
b r e a k ;
|
700
|
$ ( " # r a m " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( j ) ;
|
701
|
} e l s e {
|
702
|
$ ( " # r a m " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( i ) ;
|
703
|
}
|
704
|
r e t u r n f a l s e ;
|
705
|
} ) ;
|
706
|
|
707
|
/ / v a l i d a t e s t o r a g e i n p u t b o x
|
708
|
$ ( " # s t o r a g e - i n d i c a t o r " ) . l i v e ( ' c h a n g e ' , f u n c t i o n ( ) {
|
709
|
v a r v = N u m b e r ( t h i s . v a l u e ) ;
|
710
|
v a r i = d i s k s . i n d e x O f ( v ) ;
|
711
|
i f ( i s N a N ( v ) ) {
|
712
|
$ ( t h i s ) . v a l u e = d i s k s [ 0 ] ;
|
713
|
$ ( " # s t o r a g e " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 0 ) ;
|
714
|
} e l s e i f ( i = = - 1 ) {
|
715
|
f o r ( v a r j = 0 ; j < d i s k s . l e n g t h ; j + + )
|
716
|
i f ( v < d i s k s [ j ] )
|
717
|
b r e a k ;
|
718
|
$ ( " # s t o r a g e " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( j ) ;
|
719
|
} e l s e {
|
720
|
$ ( " # s t o r a g e " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( i ) ;
|
721
|
}
|
722
|
r e t u r n f a l s e ;
|
723
|
} ) ;
|
724
|
|
725
|
/ / s e l e c t i n g t h e s m a l l s i z e
|
726
|
$ ( " # s m a l l " ) . c l i c k ( f u n c t i o n ( ) {
|
727
|
$ ( " # c p u " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 0 ) ;
|
728
|
$ ( " # r a m " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 0 ) ;
|
729
|
$ ( " # s t o r a g e " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 0 ) ;
|
730
|
$ ( " # c p u - i n d i c a t o r " ) [ 0 ] . v a l u e = c p u s [ 0 ] ;
|
731
|
$ ( " # r a m - i n d i c a t o r " ) [ 0 ] . v a l u e = r a m [ 0 ] ;
|
732
|
$ ( " # s t o r a g e - i n d i c a t o r " ) [ 0 ] . v a l u e = d i s k s [ 0 ] ;
|
733
|
$ ( " # s m a l l " ) . a d d C l a s s ( " a c t i v e " ) ;
|
734
|
$ ( " # m e d i u m " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
735
|
$ ( " # l a r g e " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
736
|
$ ( " # c u s t o m " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
737
|
} ) ;
|
738
|
|
739
|
/ / s e l e c t i n g t h e m e d i u m s i z e
|
740
|
$ ( " # m e d i u m " ) . c l i c k ( f u n c t i o n ( ) {
|
741
|
$ ( " # c p u " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 1 ) ;
|
742
|
$ ( " # r a m " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 1 ) ;
|
743
|
$ ( " # s t o r a g e " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 1 ) ;
|
744
|
$ ( " # c p u - i n d i c a t o r " ) [ 0 ] . v a l u e = c p u s [ 1 ] ;
|
745
|
$ ( " # r a m - i n d i c a t o r " ) [ 0 ] . v a l u e = r a m [ 1 ] ;
|
746
|
$ ( " # s t o r a g e - i n d i c a t o r " ) [ 0 ] . v a l u e = d i s k s [ 1 ] ;
|
747
|
$ ( " # m e d i u m " ) . a d d C l a s s ( " a c t i v e " ) ;
|
748
|
$ ( " # s m a l l " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
749
|
$ ( " # l a r g e " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
750
|
$ ( " # c u s t o m " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
751
|
} ) ;
|
752
|
|
753
|
/ / s e l e c t i n g t h e l a r g e s i z e
|
754
|
$ ( " # l a r g e " ) . c l i c k ( f u n c t i o n ( ) {
|
755
|
$ ( " # c p u " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 2 ) ;
|
756
|
$ ( " # r a m " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 2 ) ;
|
757
|
$ ( " # s t o r a g e " ) . d a t a ( ' r a n g e i n p u t ' ) . s e t V a l u e ( 2 ) ;
|
758
|
$ ( " # c p u - i n d i c a t o r " ) [ 0 ] . v a l u e = c p u s [ 2 ] ;
|
759
|
$ ( " # r a m - i n d i c a t o r " ) [ 0 ] . v a l u e = r a m [ 2 ] ;
|
760
|
$ ( " # s t o r a g e - i n d i c a t o r " ) [ 0 ] . v a l u e = d i s k s [ 2 ] ;
|
761
|
$ ( " # l a r g e " ) . a d d C l a s s ( " a c t i v e " ) ;
|
762
|
$ ( " # m e d i u m " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
763
|
$ ( " # s m a l l " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
764
|
$ ( " # c u s t o m " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
765
|
} ) ;
|
766
|
|
767
|
/ / s e l e c t i n g t h e c u s t o m f l a v o r e n a b l e s t h e s l i d e r s
|
768
|
$ ( " # c u s t o m " ) . c l i c k ( f u n c t i o n ( ) {
|
769
|
$ ( " # c p u " ) . a t t r ( ' d i s a b l e d ' , f a l s e ) ;
|
770
|
$ ( " # r a m " ) . a t t r ( ' d i s a b l e d ' , f a l s e ) ;
|
771
|
$ ( " # s t o r a g e " ) . a t t r ( ' d i s a b l e d ' , f a l s e ) ;
|
772
|
$ ( " s t r o n g . s l i d e r s " ) . s t y l e = ' c o l o r : # 7 7 8 8 9 9 ; ' ;
|
773
|
$ ( " # c u s t o m i n p u t " ) . a t t r ( ' c h e c k e d ' , ' c h e c k e d ' ) ;
|
774
|
$ ( " # c u s t o m " ) . a d d C l a s s ( " a c t i v e " ) ;
|
775
|
$ ( " # m e d i u m " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
776
|
$ ( " # l a r g e " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
777
|
$ ( " # s m a l l " ) . r e m o v e C l a s s ( " a c t i v e " ) ;
|
778
|
} ) ;
|
779
|
|
780
|
/ / w h e n t e x t b o x g a i n s f o c u s , a d d s e l e c t i o n i n c s s
|
781
|
$ ( ' # c p u - i n d i c a t o r ' ) . f o c u s ( f u n c t i o n ( ) {
|
782
|
$ ( t h i s ) . a d d C l a s s ( ' s e l e c t e d r a n g e ' ) ;
|
783
|
} ) ;
|
784
|
|
785
|
$ ( ' # r a m - i n d i c a t o r ' ) . f o c u s ( f u n c t i o n ( ) {
|
786
|
$ ( t h i s ) . a d d C l a s s ( ' s e l e c t e d r a n g e ' ) ;
|
787
|
} ) ;
|
788
|
|
789
|
$ ( ' # s t o r a g e - i n d i c a t o r ' ) . f o c u s ( f u n c t i o n ( ) {
|
790
|
$ ( t h i s ) . a d d C l a s s ( ' s e l e c t e d r a n g e ' ) ;
|
791
|
} ) ;
|
792
|
|
793
|
/ / w h e n t e x t b o x l o s e s f o c u s , c l e a r s e l e c t i o n i n c s s
|
794
|
$ ( ' # c p u - i n d i c a t o r ' ) . b l u r ( f u n c t i o n ( ) {
|
795
|
$ ( t h i s ) . r e m o v e C l a s s ( ' s e l e c t e d r a n g e ' ) ;
|
796
|
} ) ;
|
797
|
|
798
|
$ ( ' # r a m - i n d i c a t o r ' ) . b l u r ( f u n c t i o n ( ) {
|
799
|
$ ( t h i s ) . r e m o v e C l a s s ( ' s e l e c t e d r a n g e ' ) ;
|
800
|
} ) ;
|
801
|
|
802
|
$ ( ' # s t o r a g e - i n d i c a t o r ' ) . b l u r ( f u n c t i o n ( ) {
|
803
|
$ ( t h i s ) . r e m o v e C l a s s ( ' s e l e c t e d r a n g e ' ) ;
|
804
|
} ) ;
|
805
|
|
806
|
/ / e x i t t h e w i z a r d
|
807
|
$ ( " # c a n c e l " ) . c l i c k ( f u n c t i o n ( ) {
|
808
|
$ ( " # m a c h i n e s - p a n e a # c r e a t e " ) . o v e r l a y ( ) . c l o s e ( ) ;
|
809
|
} ) ;
|
810
|
|
811
|
/ / s t a r t i n g a n e w V M t h r o u g h t h e w i z a r d
|
812
|
$ ( " # s t a r t " ) . c l i c k ( f u n c t i o n ( ) {
|
813
|
v a r i m a g e R e f = $ ( ' i n p u t [ t y p e = r a d i o ] [ n a m e = i m a g e - i d ] : c h e c k e d ' ) [ 0 ] . i d . r e p l a c e ( ' i m g - r a d i o - ' , ' ' ) ;
|
814
|
v a r f l a v o r R e f = i d e n t i f y _ f l a v o r ( $ ( " # c p u - i n d i c a t o r " ) [ 0 ] . v a l u e , $ ( " # s t o r a g e - i n d i c a t o r " ) [ 0 ] . v a l u e , $ ( " # r a m - i n d i c a t o r " ) [ 0 ] . v a l u e ) ;
|
815
|
v a r m a c h i n e N a m e = $ ( ' i n p u t [ n a m e = m a c h i n e _ n a m e ] ' ) [ 0 ] . v a l u e ;
|
816
|
i f ( j Q u e r y . t r i m ( m a c h i n e N a m e ) = = ' ' ) {
|
817
|
r e t u r n f a l s e ;
|
818
|
}
|
819
|
|
820
|
/ / r e p l a c e t e x t ' c r e a t e n e w ' w i t h p r o g r e s s i n d i c a t o r
|
821
|
$ ( ' # w i z a r d # s t a r t ' ) . t e x t ( ' ' ) ;
|
822
|
$ ( ' # w i z a r d # s t a r t ' ) . h t m l ( ' < i m g s r c = " / s t a t i c / i c o n s / i n d i c a t o r s / m e d i u m / h o r i z o n t a l - p r o g r e s s . g i f " / > ' ) ;
|
823
|
|
824
|
c r e a t e _ v m ( m a c h i n e N a m e , i m a g e R e f , f l a v o r R e f ) ;
|
825
|
|
826
|
t r y { c o n s o l e . w a r n ( ' c r e a t i n g ' + $ ( " i n p u t [ n a m e = m a c h i n e _ n a m e ] " ) [ 0 ] . v a l u e ) } c a t c h ( e r r ) { }
|
827
|
|
828
|
} ) ;
|
829
|
|
830
|
/ / m e t a d a t a w i z a r d
|
831
|
$ ( f u n c t i o n ( ) {
|
832
|
/ / c r e a t e w i z a r d o v e r l a y
|
833
|
$ ( " a # m e t a d a t a - s c r o l l a b l e " ) . o v e r l a y ( {
|
834
|
m a s k : ' # 0 0 0 ' ,
|
835
|
e f f e c t : ' d e f a u l t ' ,
|
836
|
t o p : ' 1 0 % ' ,
|
837
|
c l o s e O n C l i c k : f a l s e ,
|
838
|
o n e I n s t a n c e : f a l s e ,
|
839
|
c l o s e O n E s c : t r u e ,
|
840
|
l o a d : f a l s e ,
|
841
|
o n C l o s e : f u n c t i o n ( ) {
|
842
|
/ / r e s e t i n p u t a r e a s
|
843
|
r e s e t _ m e t a d a t a _ i n p u t ( ) ;
|
844
|
s e r v e r I D = $ ( " # m e t a d a t a - w i z a r d p : f i r s t " ) . t e x t ( ) ;
|
845
|
g e t _ m e t a d a t a ( s e r v e r I D ) ;
|
846
|
}
|
847
|
} ) ;
|
848
|
} ) ;
|
849
|
|
850
|
/ / b r i n g u p m e t a d a t a o v e r l a y
|
851
|
f u n c t i o n s h o w _ m e t a d a t a _ w i z a r d ( ) {
|
852
|
/ / g e t m e t a d a t a f o r c u r r e n t s e r v e r a n d f i l l t h e d i a l o g
|
853
|
s e r v e r I D = $ ( " # m e t a d a t a - w i z a r d p : f i r s t " ) . t e x t ( ) ;
|
854
|
g e t _ m e t a d a t a ( s e r v e r I D ) ;
|
855
|
$ ( " # m e t a d a t a - w i z a r d " ) . s h o w ( ) ;
|
856
|
$ ( " a # m e t a d a t a - s c r o l l a b l e " ) . d a t a ( ' o v e r l a y ' ) . l o a d ( ) ;
|
857
|
r e t u r n f a l s e ;
|
858
|
}
|
859
|
|
860
|
/ / u p d a t e m e t a d a t a l i s t
|
861
|
f u n c t i o n l i s t _ m e t a d a t a ( d a t a ) {
|
862
|
/ / e m p t y t h e l i s t i f i t a l r e a d y e x i s t s
|
863
|
$ ( " # m e t a d a t a - w i z a r d d i v . m e t a d a t a - c o n t a i n e r " ) . e m p t y ( ) ;
|
864
|
/ / g e t t h e v a l u e s t o s h o w
|
865
|
m e t a = d a t a . m e t a d a t a . v a l u e s ;
|
866
|
/ / s e t s e r v e i c o n
|
867
|
v a r i c o n _ n a m e = o s _ i c o n ( d a t a . m e t a d a t a ) ;
|
868
|
$ ( " # m e t a d a t a - w i z a r d . m a c h i n e - i c o n " ) . a t t r ( " s r c " , " s t a t i c / i c o n s / m a c h i n e s / s m a l l / " + i c o n _ n a m e + ' - o n . p n g ' ) ;
|
869
|
/ / s h o w v a l u e s
|
870
|
f o r ( k e y i n m e t a ) {
|
871
|
p a i r = $ ( " # m e t a d a t a - w i z a r d d i v . m e t a d a t a - p a i r - t e m p l a t e : l a s t " ) . c l o n e ( ) ;
|
872
|
/ / t r u n c a t e m e t a d a t a
|
873
|
p a i r . f i n d ( " d i v . m e t a d a t a - k e y " ) . t e x t ( k e y . s u b s t r i n g ( 0 , 1 5 ) ) ;
|
874
|
i f ( m e t a [ k e y ] . l e n g t h > 2 5 ) {
|
875
|
p a i r . f i n d ( " d i v . m e t a d a t a - v a l u e " ) . t e x t ( m e t a [ k e y ] . s u b s t r i n g ( 0 , 2 5 ) + " . . . " ) ;
|
876
|
} e l s e {
|
877
|
p a i r . f i n d ( " d i v . m e t a d a t a - v a l u e " ) . t e x t ( m e t a [ k e y ] ) ;
|
878
|
}
|
879
|
/ / g e t t h e s e r v e r I D
|
880
|
s e r v e r I D = $ ( " # m e t a d a t a - w i z a r d p : f i r s t " ) . t e x t ( ) ;
|
881
|
/ / s t o r e t h e f u l l m e t a d a t a v a l u e o n a h i d d e n d i v
|
882
|
p a i r . f i n d ( " d i v . m e t a d a t a - f u l l - v a l u e " ) . t e x t ( m e t a [ k e y ] ) ;
|
883
|
/ / s h o w / h i d e e d i t - r e m o v e b u t t o n s o n h o v e r
|
884
|
p a i r . h o v e r ( f u n c t i o n ( ) { $ ( t h i s ) . f i n d ( ' . m e t a d a t a - e d i t ' ) . s h o w ( ) ; } , f u n c t i o n ( ) { $ ( t h i s ) . f i n d ( ' . m e t a d a t a - e d i t ' ) . h i d e ( ) ; } ) ;
|
885
|
/ / a d d i t t o t h e l i s t
|
886
|
p a i r . a p p e n d T o ( " # m e t a d a t a - w i z a r d d i v . m e t a d a t a - c o n t a i n e r " ) . f a d e I n ( ) ;
|
887
|
}
|
888
|
}
|
889
|
|
890
|
f u n c t i o n r e s e t _ m e t a d a t a _ i n p u t ( ) {
|
891
|
/ / r e s e t i n p u t a r e a s
|
892
|
$ ( " # m e t a d a t a - w i z a r d d i v . m e t a d a t a - c o n t a i n e r " ) . e m p t y ( ) ;
|
893
|
}
|
894
|
|
895
|
/ / e x i t t h e m e t a d a t a w i z a r d
|
896
|
$ ( " # m e t a d a t a - c a n c e l " ) . c l i c k ( f u n c t i o n ( ) {
|
897
|
$ ( " a # m e t a d a t a - s c r o l l a b l e " ) . o v e r l a y ( ) . c l o s e ( ) ;
|
898
|
} ) ;
|
899
|
|
900
|
/ / i n t e r c e p t c r e a t e n e w m e t a d a t a c l i c k
|
901
|
$ ( " # m e t a d a t a - w i z a r d # m e t a d a t a - c r e a t e " ) . c l i c k ( f u n c t i o n ( ) {
|
902
|
p a i r = $ ( " # m e t a d a t a - w i z a r d d i v . m e t a d a t a - a d d - t e m p l a t e : f i r s t " ) . c l o n e ( ) ;
|
903
|
p a i r . p r e p e n d T o ( " # m e t a d a t a - w i z a r d d i v . m e t a d a t a - c o n t a i n e r " ) . f a d e I n ( ) ;
|
904
|
w i t h ( p a i r . f i n d ( ' i n p u t # a d d - m e t a - k e y ' ) ) {
|
905
|
w i t h ( n e x t ( ' u l : f i r s t ' ) ) {
|
906
|
f i n d ( ' l i ' ) . c l i c k ( f u n c t i o n ( ) {
|
907
|
$ ( t h i s ) . p a r e n t ( ) . p r e v ( ' . t e x t d r o p d o w n - o u t e r ' ) . f i n d ( ' i n p u t : f i r s t ' ) . a t t r ( ' v a l u e ' , $ ( t h i s ) . f i n d ( ' . d r o p d o w n i t e m ' ) . h t m l ( ) ) ;
|
908
|
$ ( t h i s ) . p a r e n t ( ) . h i d e ( ) ;
|
909
|
} ) ;
|
910
|
h i d e ( ) ;
|
911
|
}
|
912
|
|
913
|
k e y p r e s s ( f u n c t i o n ( ) {
|
914
|
$ ( t h i s ) . p a r e n t ( ) . n e x t ( ' u l : f i r s t ' ) . h i d e ( ) ;
|
915
|
} ) ;
|
916
|
|
917
|
c h a n g e ( f u n c t i o n ( ) {
|
918
|
$ ( t h i s ) . p a r e n t ( ) . n e x t ( ' u l : f i r s t ' ) . h i d e ( ) ;
|
919
|
} ) ;
|
920
|
|
921
|
w r a p ( ' < d i v c l a s s = " t e x t d r o p d o w n - o u t e r " s t y l e = " w i d t h : ' + w i d t h ( ) + ' p x ; h e i g h t : ' + ( h e i g h t ( ) + 5 ) + ' p x " > < / d i v > ' ) ;
|
922
|
v a r b t n = p a r e n t ( ) . p r e p e n d ( ' < d i v c l a s s = " t e x t d r o p d o w n - b t n " > & n b s p ; < / d i v > ' ) . f i n d ( ' . t e x t d r o p d o w n - b t n ' ) ;
|
923
|
w i d t h ( w i d t h ( ) - b t n . w i d t h ( ) - 5 ) ;
|
924
|
c s s ( " b o r d e r " , " 0 " ) ;
|
925
|
|
926
|
b t n . c l i c k ( f u n c t i o n ( ) {
|
927
|
v a r p = p a r e n t ( ) ;
|
928
|
w i t h ( p . n e x t ( ' u l : f i r s t ' ) ) {
|
929
|
c s s ( ' p o s i t i o n ' , ' a b s o l u t e ' ) ;
|
930
|
c s s ( ' w i d t h ' , p . w i d t h ( ) ) ;
|
931
|
c s s ( ' l e f t ' , p . p o s i t i o n ( ) . l e f t + 4 ) ;
|
932
|
c s s ( ' t o p ' , p . p o s i t i o n ( ) . t o p + p . h e i g h t ( ) + 1 ) ;
|
933
|
t o g g l e ( ) ;
|
934
|
}
|
935
|
} ) ;
|
936
|
}
|
937
|
p a i r . f i n d ( ' i n p u t # a d d - m e t a - k e y ' ) . f o c u s ( ) ;
|
938
|
} ) ;
|
939
|
|
940
|
/ / s a v e n e w m e t a d a t a
|
941
|
$ ( ' # m e t a d a t a - w i z a r d . a d d b u t t o n s . s a v e ' ) . d i e ( ' c l i c k ' ) ;
|
942
|
$ ( ' # m e t a d a t a - w i z a r d . a d d b u t t o n s . s a v e ' ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
943
|
k e y V a l u e = $ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' i n p u t # a d d - m e t a - k e y ' ) . v a l ( ) ;
|
944
|
v a l V a l u e = $ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' i n p u t # a d d - m e t a - v a l u e ' ) . v a l ( ) ;
|
945
|
i f ( ( k e y V a l u e = = ' 1 5 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ' ) | | ( v a l V a l u e = = ' 1 5 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ' ) ) {
|
946
|
r e t u r n f a l s e ;
|
947
|
} e l s e {
|
948
|
s e r v e r I D = $ ( " # m e t a d a t a - w i z a r d p : f i r s t " ) . t e x t ( ) ;
|
949
|
p a i r = $ ( " # m e t a d a t a - w i z a r d d i v . m e t a d a t a - p a i r - t e m p l a t e : l a s t " ) . c l o n e ( ) ;
|
950
|
p a i r . f i n d ( " d i v . m e t a d a t a - k e y " ) . t e x t ( k e y V a l u e . s u b s t r i n g ( 0 , 1 5 ) ) ;
|
951
|
i f ( v a l V a l u e . l e n g t h > 2 5 ) {
|
952
|
p a i r . f i n d ( " d i v . m e t a d a t a - v a l u e " ) . t e x t ( v a l V a l u e . s u b s t r i n g ( 0 , 2 5 ) + " . . . " ) ;
|
953
|
} e l s e {
|
954
|
p a i r . f i n d ( " d i v . m e t a d a t a - v a l u e " ) . t e x t ( v a l V a l u e ) ;
|
955
|
}
|
956
|
p a i r . f i n d ( " d i v . m e t a d a t a - f u l l - v a l u e " ) . t e x t ( v a l V a l u e ) ;
|
957
|
u p d a t e _ m e t a d a t a ( s e r v e r I D , k e y V a l u e , v a l V a l u e ) ;
|
958
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . r e m o v e ( ) ;
|
959
|
p a i r . h o v e r ( f u n c t i o n ( ) { $ ( t h i s ) . f i n d ( ' . m e t a d a t a - e d i t ' ) . s h o w ( ) ; } , f u n c t i o n ( ) { $ ( t h i s ) . f i n d ( ' . m e t a d a t a - e d i t ' ) . h i d e ( ) ; } ) ;
|
960
|
/ / a d d i t t o t h e l i s t
|
961
|
p a i r . i n s e r t B e f o r e ( " # m e t a d a t a - w i z a r d d i v . m e t a d a t a - p a i r - t e m p l a t e : f i r s t " ) . f a d e I n ( ) ;
|
962
|
}
|
963
|
} ) ;
|
964
|
|
965
|
/ / i n t e r c e p t c a n c e l n e w m e t a d a t a c r e a t i o n
|
966
|
$ ( " # m e t a d a t a - w i z a r d . a d d b u t t o n s . c a n c e l " ) . d i e ( ' c l i c k ' ) ;
|
967
|
$ ( " # m e t a d a t a - w i z a r d . a d d b u t t o n s . c a n c e l " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
968
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f a d e O u t ( ' f a s t ' ) ;
|
969
|
w i n d o w . s e t T i m e o u t ( f u n c t i o n ( ) { $ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . r e m o v e ( ) ; } , 4 0 0 ) ;
|
970
|
} ) ;
|
971
|
|
972
|
/ / m e t a d a t a r e m o v e b u t t o n
|
973
|
$ ( " # m e t a d a t a - w i z a r d . m e t a d a t a - e d i t . r e m o v e " ) . d i e ( ' c l i c k ' )
|
974
|
$ ( " # m e t a d a t a - w i z a r d . m e t a d a t a - e d i t . r e m o v e " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
975
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f a d e O u t ( ' s l o w ' ) ;
|
976
|
s e r v e r I D = $ ( " # m e t a d a t a - w i z a r d p : f i r s t " ) . t e x t ( ) ;
|
977
|
k e y V a l u e = $ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' d i v . m e t a d a t a - k e y ' ) . t e x t ( ) ;
|
978
|
d e l e t e _ m e t a d a t a ( s e r v e r I D , k e y V a l u e ) ;
|
979
|
} ) ;
|
980
|
|
981
|
/ / m e t a d a t a e d i t b u t t o n
|
982
|
$ ( " # m e t a d a t a - w i z a r d . m e t a d a t a - e d i t . e d i t " ) . d i e ( ' c l i c k ' ) ;
|
983
|
$ ( " # m e t a d a t a - w i z a r d . m e t a d a t a - e d i t . e d i t " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
984
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' d i v . m e t a d a t a - v a l u e ' ) . h t m l ( " < i n p u t i d = \ " v a l u e - e d i t \ " m a x l e n g t h = \ " 1 5 0 \ " t y p e = \ " t e x t \ " c l a s s = \ " m e t a t e x t b o x \ " v a l u e = \ " " + $ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' . m e t a d a t a - f u l l - v a l u e ' ) . t e x t ( ) +
|
985
|
" \ " / > < s p a n c l a s s = \ " o l d V a l u e \ " > " +
|
986
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' . m e t a d a t a - f u l l - v a l u e ' ) . t e x t ( ) + " < / s p a n > " ) ;
|
987
|
$ ( t h i s ) . p a r e n t ( ) . h i d e ( ) ;
|
988
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . u n b i n d ( ' m o u s e e n t e r ' ) . u n b i n d ( ' m o u s e l e a v e ' ) ;
|
989
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' . e d i t b u t t o n s ' ) . s h o w ( ) ;
|
990
|
} ) ;
|
991
|
|
992
|
/ / m e t a d a t a c a n c e l e d i t b u t t o n
|
993
|
$ ( " # m e t a d a t a - w i z a r d . e d i t b u t t o n s . r e m o v e " ) . d i e ( ' c l i c k ' ) ;
|
994
|
$ ( " # m e t a d a t a - w i z a r d . e d i t b u t t o n s . r e m o v e " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
995
|
v a r o l d V a l u e = $ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' . o l d V a l u e ' ) . t e x t ( ) ;
|
996
|
i f ( o l d V a l u e . l e n g t h > 2 5 ) {
|
997
|
o l d V a l u e = o l d V a l u e . s u b s t r i n g ( 0 , 2 5 ) + " . . . " ;
|
998
|
}
|
999
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' d i v . m e t a d a t a - v a l u e ' ) . h t m l ( o l d V a l u e ) ;
|
1000
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . h o v e r ( f u n c t i o n ( ) { $ ( t h i s ) . f i n d ( ' . m e t a d a t a - e d i t ' ) . s h o w ( ) ; } , f u n c t i o n ( ) { $ ( t h i s ) . f i n d ( ' . m e t a d a t a - e d i t ' ) . h i d e ( ) ; } ) ;
|
1001
|
$ ( t h i s ) . p a r e n t ( ) . h i d e ( ) ;
|
1002
|
} ) ;
|
1003
|
|
1004
|
/ / m e t a d a t a s a v e e d i t b u t t o n
|
1005
|
$ ( " # m e t a d a t a - w i z a r d . e d i t b u t t o n s . s a v e " ) . d i e ( ' c l i c k ' ) ;
|
1006
|
$ ( " # m e t a d a t a - w i z a r d . e d i t b u t t o n s . s a v e " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
1007
|
n e w V a l u e = $ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' i n p u t . m e t a t e x t b o x ' ) . v a l ( ) ;
|
1008
|
k e y V a l u e = $ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' d i v . m e t a d a t a - k e y ' ) . t e x t ( ) ;
|
1009
|
o l d V a l u e = $ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' . o l d V a l u e ' ) . t e x t ( ) ;
|
1010
|
i f ( ! ( n e w V a l u e = = o l d V a l u e ) ) {
|
1011
|
u p d a t e _ m e t a d a t a ( s e r v e r I D , k e y V a l u e , n e w V a l u e ) ;
|
1012
|
}
|
1013
|
i f ( n e w V a l u e . l e n g t h > 2 5 ) {
|
1014
|
n e w V a l u e = n e w V a l u e . s u b s t r i n g ( 0 , 2 5 ) + " . . . " ;
|
1015
|
}
|
1016
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' d i v . m e t a d a t a - v a l u e ' ) . h t m l ( n e w V a l u e ) ;
|
1017
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . h o v e r ( f u n c t i o n ( ) { $ ( t h i s ) . f i n d ( ' . m e t a d a t a - e d i t ' ) . s h o w ( ) ; } , f u n c t i o n ( ) { $ ( t h i s ) . f i n d ( ' . m e t a d a t a - e d i t ' ) . h i d e ( ) ; } ) ;
|
1018
|
$ ( t h i s ) . p a r e n t ( ) . h i d e ( ) ;
|
1019
|
|
1020
|
} ) ;
|
1021
|
|
1022
|
/ / t r a p p i n g k e y d o w n e v e n t
|
1023
|
j Q u e r y . e x p r [ ' : ' ] . f o c u s = f u n c t i o n ( e l e m ) {
|
1024
|
v a r a p i = $ ( " # m e t a d a t a - w i z a r d " ) . d a t a ( " s c r o l l a b l e " ) ;
|
1025
|
i f ( a p i . g e t I n d e x ( ) = = 1 ) {
|
1026
|
r e t u r n e l e m = = = d o c u m e n t . a c t i v e E l e m e n t & & ( e l e m . t y p e | | e l e m . h r e f ) ;
|
1027
|
}
|
1028
|
} ;
|
1029
|
|
1030
|
/ / i n t e r c e p t c r e a t e m e t a d a t a k e y f o c u s
|
1031
|
$ ( " # m e t a d a t a - w i z a r d i n p u t # a d d - m e t a - k e y " ) . l i v e ( ' f o c u s i n ' , f u n c t i o n ( ) {
|
1032
|
i f ( $ ( t h i s ) . p a r e n t ( ) . h a s C l a s s ( " d i v - e n a b l e d " ) ) {
|
1033
|
} e l s e {
|
1034
|
$ ( t h i s ) . p a r e n t ( ) . a d d C l a s s ( " d i v - e n a b l e d " ) ;
|
1035
|
$ ( t h i s ) . a d d C l a s s ( " i n p u t - e n a b l e d " ) ;
|
1036
|
i f ( t h i s . v a l u e = = ' 1 5 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ' ) {
|
1037
|
t h i s . v a l u e = ' ' ;
|
1038
|
}
|
1039
|
}
|
1040
|
r e t u r n f a l s e ;
|
1041
|
} ) ;
|
1042
|
|
1043
|
/ / i n t e r c e p t c r e a t e m e t a d a t a k e y f o c u s o u t
|
1044
|
$ ( " # m e t a d a t a - w i z a r d i n p u t # a d d - m e t a - k e y " ) . l i v e ( ' f o c u s o u t ' , f u n c t i o n ( ) {
|
1045
|
$ ( t h i s ) . p a r e n t ( ) . r e m o v e C l a s s ( " d i v - e n a b l e d " ) ;
|
1046
|
i f ( t h i s . v a l u e = = " " ) {
|
1047
|
$ ( t h i s ) . r e m o v e C l a s s ( " i n p u t - e n a b l e d " ) ;
|
1048
|
t h i s . v a l u e = ' 1 5 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ' ;
|
1049
|
}
|
1050
|
r e t u r n f a l s e ;
|
1051
|
} ) ;
|
1052
|
|
1053
|
|
1054
|
/ / i n t e r c e p t m e t a d a t a d r o p d o w n i t e m c l i c k
|
1055
|
$ ( " . m e t a d a t a - a d d - t e m p l a t e l i " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
1056
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " i n p u t # a d d - m e t a - v a l u e " ) . f o c u s ( ) ;
|
1057
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " i n p u t # a d d - m e t a - k e y " ) . a d d C l a s s ( " i n p u t - e n a b l e d " ) ;
|
1058
|
} ) ;
|
1059
|
|
1060
|
/ / i n t e r c e p t c r e a t e m e t a d a t a k e y f o c u s
|
1061
|
$ ( " # m e t a d a t a - w i z a r d i n p u t # a d d - m e t a - v a l u e " ) . l i v e ( ' f o c u s i n ' , f u n c t i o n ( ) {
|
1062
|
i f ( $ ( t h i s ) . h a s C l a s s ( " i n p u t - e n a b l e d " ) ) {
|
1063
|
} e l s e {
|
1064
|
$ ( t h i s ) . a d d C l a s s ( " i n p u t - e n a b l e d " ) ;
|
1065
|
t h i s . v a l u e = ' ' ;
|
1066
|
}
|
1067
|
r e t u r n f a l s e ;
|
1068
|
} ) ;
|
1069
|
|
1070
|
/ / i n t e r c e p t c r e a t e m e t a d a t a k e y f o c u s o u t
|
1071
|
$ ( " # m e t a d a t a - w i z a r d i n p u t # a d d - m e t a - v a l u e " ) . l i v e ( ' f o c u s o u t ' , f u n c t i o n ( ) {
|
1072
|
i f ( t h i s . v a l u e = = " " ) {
|
1073
|
$ ( t h i s ) . r e m o v e C l a s s ( " i n p u t - e n a b l e d " ) ;
|
1074
|
t h i s . v a l u e = ' 1 5 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ' ;
|
1075
|
}
|
1076
|
r e t u r n f a l s e ;
|
1077
|
} ) ;
|
1078
|
|
1079
|
/ / i n t e r c e p t c l i c k o n c a n c e l b u t t o n i n m e t a d a t a a d d d i a l o g
|
1080
|
$ ( ' # a d d - d i a l o g b u t t o n . c a n c e l ' ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
1081
|
r e s e t _ m e t a d a t a _ i n p u t ( ) ;
|
1082
|
} ) ;
|
1083
|
|
1084
|
/ / i n t e r c e p t c l i c k o n s a v e b u t t o n i n m e t a d a t a a d d d i a l o g
|
1085
|
$ ( ' # a d d - d i a l o g b u t t o n . s a v e ' ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
1086
|
/ / i f b o t h f i e l d s a r e f i l l e d i n
|
1087
|
i f ( $ ( ' i n p u t . k e y ' ) . h a s C l a s s ( " i n p u t - e n a b l e d " ) & & $ ( ' t e x t a r e a . v a l u e ' ) . h a s C l a s s ( " i n p u t - e n a b l e d " ) ) {
|
1088
|
/ / g e t t h e s e r v e r i d , m e t a k e y a n d m e t a v a l u e n e e d e d f o r t h e a j a x c a l l
|
1089
|
v a r s e r v e r I D = $ ( t h i s ) . p a r e n t ( ) . f i n d ( ' h 3 p ' ) . t e x t ( ) ;
|
1090
|
v a r m e t a _ k e y = $ ( t h i s ) . p a r e n t ( ) . f i n d ( ' i n p u t . k e y ' ) . a t t r ( ' v a l u e ' ) ;
|
1091
|
v a r m e t a _ v a l u e = $ ( t h i s ) . p a r e n t ( ) . f i n d ( ' t e x t a r e a . v a l u e ' ) [ 0 ] . v a l u e ;
|
1092
|
/ / m a k e t h e a j a x c a l l a n d l i s t t h e n e w G E T r e s u l t s
|
1093
|
a d d _ m e t a d a t a ( s e r v e r I D , m e t a _ k e y , m e t a _ v a l u e ) ;
|
1094
|
/ / r e s e t i n p u t a r e a s
|
1095
|
r e s e t _ m e t a d a t a _ i n p u t ( ) ;
|
1096
|
/ / g o t o p r e v i o u s s t e p
|
1097
|
$ ( ' # a d d - d i a l o g b u t t o n . p r e v ' ) . c l i c k ( ) ;
|
1098
|
} e l s e {
|
1099
|
/ / f i n d w h i c h f i e l d i s n o t f i l l e d i n a n d f o c u s t h e r e
|
1100
|
i f ( ! $ ( ' i n p u t . k e y ' ) . h a s C l a s s ( " i n p u t - e n a b l e d " ) ) {
|
1101
|
$ ( ' i n p u t . k e y ' ) . f o c u s ( ) ;
|
1102
|
$ ( ' i n p u t . k e y ' ) . f o c u s i n ( ) ;
|
1103
|
} e l s e {
|
1104
|
$ ( ' t e x t a r e a . v a l u e ' ) . f o c u s ( ) ;
|
1105
|
$ ( ' t e x t a r e a . v a l u e ' ) . f o c u s i n ( ) ;
|
1106
|
}
|
1107
|
}
|
1108
|
r e t u r n f a l s e ;
|
1109
|
} ) ;
|
1110
|
|
1111
|
/ / c o n f i r m a l l a c t i o n s
|
1112
|
$ ( " # m a c h i n e s - p a n e d i v . c o n f i r m _ m u l t i p l e . y e s " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
1113
|
w h i l e ( p e n d i n g _ a c t i o n s . l e n g t h > 0 ) { / / i f t h e r e i s a p e n d i n g a c t i o n f o r t h i s s e r v e r e x e c u t e i t
|
1114
|
a c t i o n = p e n d i n g _ a c t i o n s . p o p ( ) ; / / e x t r a c t a c t i o n
|
1115
|
v a r s e r v e r I D = a c t i o n [ 1 ] ;
|
1116
|
i f ( $ . c o o k i e ( " v i e w " ) ! = ' 1 ' ) { / / s t a n d a r d v i e w
|
1117
|
$ ( ' # ' + s e r v e r I D + ' . s e l e c t e d ' ) . r e m o v e C l a s s ( ' s e l e c t e d ' ) ;
|
1118
|
$ ( ' # ' + s e r v e r I D + ' . d i s p l a y ' ) . r e m o v e C l a s s ( ' d i s p l a y ' ) ;
|
1119
|
i f ( a c t i o n [ 0 ] = = s h u t d o w n ) {
|
1120
|
$ ( ' # ' + s e r v e r I D + ' . s t a t u s ' ) . t e x t ( T R A N S I T I O N _ M E S S A G E S [ ' S h u t t i n g d o w n ' ] ) ;
|
1121
|
} e l s e i f ( a c t i o n [ 0 ] = = s t a r t ) {
|
1122
|
$ ( ' # ' + s e r v e r I D + ' . s t a t u s ' ) . t e x t ( T R A N S I T I O N _ M E S S A G E S [ ' S t a r t i n g ' ] ) ;
|
1123
|
} e l s e i f ( a c t i o n [ 0 ] = = r e b o o t ) {
|
1124
|
$ ( ' # ' + s e r v e r I D + ' . s t a t u s ' ) . t e x t ( T R A N S I T I O N _ M E S S A G E S [ ' R e b o o t i n g ' ] ) ;
|
1125
|
} e l s e i f ( a c t i o n [ 0 ] = = d e s t r o y ) {
|
1126
|
$ ( ' # ' + s e r v e r I D + ' . s t a t u s ' ) . t e x t ( T R A N S I T I O N _ M E S S A G E S [ ' D e s t r o y i n g ' ] ) ;
|
1127
|
}
|
1128
|
$ ( ' # ' + s e r v e r I D + ' . s p i n n e r ' ) . s h o w ( ) ;
|
1129
|
} e l s e { / / l i s t v i e w
|
1130
|
o s I c o n = $ ( ' # ' + s e r v e r I D ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' . l i s t - l o g o ' ) ;
|
1131
|
o s I c o n . a t t r ( ' o s ' , o s I c o n . a t t r ( ' s r c ' ) ) ;
|
1132
|
o s I c o n . a t t r ( ' s r c ' , ' s t a t i c / i c o n s / i n d i c a t o r s / s m a l l / p r o g r e s s . g i f ' ) ;
|
1133
|
i f ( a c t i o n [ 0 ] = = s h u t d o w n ) {
|
1134
|
$ ( ' # ' + s e r v e r I D ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' s p a n . s t a t u s ' ) . t e x t ( T R A N S I T I O N _ M E S S A G E S [ ' S h u t t i n g d o w n ' ] ) ;
|
1135
|
} e l s e i f ( a c t i o n [ 0 ] = = s t a r t ) {
|
1136
|
$ ( ' # ' + s e r v e r I D ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' s p a n . s t a t u s ' ) . t e x t ( T R A N S I T I O N _ M E S S A G E S [ ' S t a r t i n g ' ] ) ;
|
1137
|
} e l s e i f ( a c t i o n [ 0 ] = = r e b o o t ) {
|
1138
|
$ ( ' # ' + s e r v e r I D ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' s p a n . s t a t u s ' ) . t e x t ( T R A N S I T I O N _ M E S S A G E S [ ' R e b o o t i n g ' ] ) ;
|
1139
|
} e l s e i f ( a c t i o n [ 0 ] = = d e s t r o y ) {
|
1140
|
$ ( ' # ' + s e r v e r I D ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( ' s p a n . s t a t u s ' ) . t e x t ( T R A N S I T I O N _ M E S S A G E S [ ' D e s t r o y i n g ' ] ) ;
|
1141
|
}
|
1142
|
}
|
1143
|
a c t i o n [ 0 ] ( [ s e r v e r I D ] ) ; / / e x e c u t e a c t i o n
|
1144
|
}
|
1145
|
u p d a t e _ c o n f i r m a t i o n s ( ) ;
|
1146
|
} ) ;
|
1147
|
|
1148
|
/ / c a n c e l a l l a c t i o n s
|
1149
|
$ ( " # m a c h i n e s - p a n e d i v . c o n f i r m _ m u l t i p l e . n o " ) . l i v e ( ' c l i c k ' , f u n c t i o n ( ) {
|
1150
|
p e n d i n g _ a c t i o n s = [ ] ;
|
1151
|
$ ( ' # m a c h i n e s - p a n e . m a c h i n e . s e l e c t e d ' ) . r e m o v e C l a s s ( ' s e l e c t e d ' ) ;
|
1152
|
$ ( ' # m a c h i n e s v i e w - l i s t . a c t i o n s . s e l e c t e d ' ) . r e m o v e C l a s s ( ' s e l e c t e d ' ) ;
|
1153
|
$ ( ' # m a c h i n e s - p a n e . m a c h i n e . d i s p l a y ' ) . r e m o v e C l a s s ( ' d i s p l a y ' ) ;
|
1154
|
u p d a t e _ c o n f i r m a t i o n s ( ) ;
|
1155
|
} ) ;
|
1156
|
|
1157
|
/ / b a s i c f u n c t i o n s e x e c u t e d o n p a g e l o a d
|
1158
|
i f ( i m a g e s . l e n g t h > 0 ) {
|
1159
|
/ / p o p u l a t e i m a g e l i s t
|
1160
|
u p d a t e _ w i z a r d _ i m a g e s ( ) ;
|
1161
|
}
|
1162
|
i f ( f l a v o r s . l e n g t h > 0 ) {
|
1163
|
/ / c o n f i g u r e f l a v o r s
|
1164
|
u p d a t e _ w i z a r d _ f l a v o r s ( ) ;
|
1165
|
}
|
1166
|
/ / c r e a t e t a b s f o r m a i n m e n u
|
1167
|
$ ( " u l . t a b s " ) . t a b s ( " d i v . p a n e s u l " ) ;
|
1168
|
|
1169
|
< / s c r i p t >
|
1170
|
< / d i v >
|
1171
|
< d i v i d = " n e t w o r k s - p a n e " c l a s s = " p a n e " > < / d i v >
|
1172
|
< d i v i d = " d i s k s - p a n e " c l a s s = " p a n e " > < / d i v >
|
1173
|
< / d i v >
|
1174
|
< ! - - b a s e n o t i f i c a t i o n f o r e r r o r / s u c c e s s r e p o r t i n g - - >
|
1175
|
< a i d = " n o t i f i c a t i o n " r e l = " # e r r o r - s u c c e s s " h r e f = " # " > < / a >
|
1176
|
|
1177
|
< d i v c l a s s = " m o d a l " i d = " e r r o r - s u c c e s s " >
|
1178
|
< h 3 c l a s s = " p o p u p - h e a d e r " > E r r o r ! / S u c c e s s ! < / h 3 >
|
1179
|
< d i v c l a s s = " p o p u p - b o d y " >
|
1180
|
< d i v c l a s s = " p o p u p - b o d y - i n n e r " >
|
1181
|
< d i v c l a s s = " m a c h i n e - n o w - b u i l d i n g " > < / d i v >
|
1182
|
< d i v c l a s s = " p o p u p - s e p a r a t o r " > < / d i v >
|
1183
|
< d i v c l a s s = " p a s s w o r d - c o n t a i n e r " >
|
1184
|
< d i v c l a s s = " p a s s w o r d - h e a d e r " > ? ? ? ? ? ? ? ? ? ? ? : < / d i v >
|
1185
|
< d i v c l a s s = " p a s s w o r d " > < / d i v >
|
1186
|
< / d i v >
|
1187
|
< d i v c l a s s = " p o p u p - d e t a i l s " >
|
1188
|
< d i v c l a s s = " w r i t e - p a s s w o r d " > < / d i v >
|
1189
|
< d i v c l a s s = " w r i t e - p a s s w o r d - d e t a i l s " > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? < / d i v >
|
1190
|
< / d i v >
|
1191
|
< / d i v >
|
1192
|
< / d i v >
|
1193
|
< / d i v >
|
1194
|
< / d i v >
|
1195
|
< / d i v >
|
1196
|
|
1197
|
< ! - - a c t i v a t e t a b s w i t h J a v a S c r i p t - - >
|
1198
|
< s c r i p t >
|
1199
|
|
1200
|
$ ( f u n c t i o n ( ) {
|
1201
|
$ ( " u l . c s s - t a b s " ) . t a b s ( " d i v . c s s - p a n e s d i v . p a n e " , {
|
1202
|
o n B e f o r e C l i c k : f u n c t i o n ( e v e n t , i ) {
|
1203
|
/ / g e t t h e p a n e t o b e o p e n e d
|
1204
|
v a r p a n e = t h i s . g e t P a n e s ( ) . e q ( i ) ;
|
1205
|
p a n e . t e x t ( ' ' ) ;
|
1206
|
/ / c h a n g e t h e d i s p l a y i n g t i t l e
|
1207
|
$ ( " . t a b - n a m e " ) . t e x t ( t h i s . g e t T a b s ( ) . e q ( i ) . a t t r ( " h r e f " ) ) ;
|
1208
|
/ / l o a d i t w i t h a p a g e s p e c i f i e d i n t h e t a b ' s h r e f a t t r i b u t e
|
1209
|
p a n e . l o a d ( t h i s . g e t T a b s ( ) . e q ( i ) . a t t r ( " h r e f " ) , f u n c t i o n ( ) { i f ( ! i ) { c h o o s e _ v i e w ( ) } } ) ;
|
1210
|
}
|
1211
|
} ) ;
|
1212
|
} ) ;
|
1213
|
|
1214
|
/ / t o g g l e m a i n m e n u
|
1215
|
$ ( " # a r r o w " ) . c l i c k ( f u n c t i o n ( e v e n t ) {
|
1216
|
t o g g l e M e n u ( ) ;
|
1217
|
} ) ;
|
1218
|
/ / c h a n g e m e n u t i t l e o n h o v e r
|
1219
|
$ ( " u l . c s s - t a b s l i " ) . h o v e r (
|
1220
|
f u n c t i o n ( ) {
|
1221
|
i f ( $ ( t h i s ) . f i n d ( " a . c u r r e n t " ) . l e n g t h = = 0 ) {
|
1222
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " . t a b - n a m e " ) . t e x t ( $ ( t h i s ) . f i n d ( " a " ) . a t t r ( " h r e f " ) ) ;
|
1223
|
}
|
1224
|
} ,
|
1225
|
f u n c t i o n ( ) {
|
1226
|
$ ( t h i s ) . p a r e n t ( ) . p a r e n t ( ) . f i n d ( " . t a b - n a m e " ) . t e x t ( $ ( t h i s ) . p a r e n t ( ) . f i n d ( " a . c u r r e n t " ) . a t t r ( " h r e f " ) ) ;
|
1227
|
}
|
1228
|
) ;
|
1229
|
< / s c r i p t >
|
1230
|
|
1231
|
|
1232
|
|
1233
|
< d i v i d = ' f o o t e r ' >
|
1234
|
< d i v i d = ' f o o t e r - t e x t ' >
|
1235
|
< a h r e f = " # " > C o p y r i g h t ( c ) 2 0 1 1 G R N E T S . A . < / a >
|
1236
|
& n b s p ; | & n b s p ;
|
1237
|
< a h r e f = " # " > A b o u t < / a >
|
1238
|
& n b s p ; | & n b s p ;
|
1239
|
< a h r e f = " # " > H e l p < / a >
|
1240
|
& n b s p ; | & n b s p ;
|
1241
|
< a h r e f = " # " > C o n t a c t < / a >
|
1242
|
& n b s p ; | & n b s p ;
|
1243
|
< a h r e f = " # " > T e r m s < / a >
|
1244
|
& n b s p ; | & n b s p ;
|
1245
|
< a h r e f = " # " > P r i v a c y < / a >
|
1246
|
< / d i v >
|
1247
|
< d i v i d = " f o o t e r - b g " >
|
1248
|
< / d i v >
|
1249
|
< / d i v >
|
1250
|
|
1251
|
< / b o d y >
|
1252
|
< / h t m l >
|
1253
|
|