├── 1.build.sh
├── 2.create.sh
├── 3.delete.sh
├── 4.debug.sh
├── Dockerfile
├── LICENSE
├── README.md
├── app.py
├── deploy
├── gui-assistant-deploy.yaml
└── gui-assistant-svc.yaml
├── image
├── first.png
├── second.png
└── third.png
├── static
├── css
│ ├── style.css
│ ├── style.css.map
│ └── style.scss
├── fonts
│ ├── material-design-iconic-font
│ │ ├── css
│ │ │ ├── material-design-iconic-font.css
│ │ │ └── material-design-iconic-font.min.css
│ │ └── fonts
│ │ │ ├── Material-Design-Iconic-Font.eot
│ │ │ ├── Material-Design-Iconic-Font.svg
│ │ │ ├── Material-Design-Iconic-Font.ttf
│ │ │ ├── Material-Design-Iconic-Font.woff
│ │ │ └── Material-Design-Iconic-Font.woff2
│ └── muli
│ │ ├── Muli-Black.ttf
│ │ ├── Muli-BlackItalic.ttf
│ │ ├── Muli-Bold.ttf
│ │ ├── Muli-BoldItalic.ttf
│ │ ├── Muli-ExtraBold.ttf
│ │ ├── Muli-ExtraBoldItalic.ttf
│ │ ├── Muli-ExtraLight.ttf
│ │ ├── Muli-ExtraLightItalic.ttf
│ │ ├── Muli-Italic.ttf
│ │ ├── Muli-Light.ttf
│ │ ├── Muli-LightItalic.ttf
│ │ ├── Muli-Regular.ttf
│ │ ├── Muli-SemiBold.ttf
│ │ ├── Muli-SemiBoldItalic.ttf
│ │ └── OFL.txt
├── images
│ ├── gui-assistant.jpg
│ └── image1.png
└── js
│ ├── jquery-3.3.1.min.js
│ ├── jquery.steps.js
│ └── main.js
└── templates
└── index.html
/1.build.sh:
--------------------------------------------------------------------------------
1 | docker_id="ketidevit2"
2 | controller_name="opencsd-gui-assistant"
3 |
4 | docker build -t $docker_id/$controller_name:v0.0.1 . && \
5 | docker push $docker_id/$controller_name:v0.0.1
--------------------------------------------------------------------------------
/2.create.sh:
--------------------------------------------------------------------------------
1 | kubectl create -f deploy/
2 |
--------------------------------------------------------------------------------
/3.delete.sh:
--------------------------------------------------------------------------------
1 | kubectl delete -f deploy/
2 |
--------------------------------------------------------------------------------
/4.debug.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | while [ -z $PODNAME ]
4 | do
5 | PODNAME=`kubectl get po -o=name -A --field-selector=status.phase=Running | grep opencsd-gui-assistant`
6 | PODNAME="${PODNAME:4}"
7 | done
8 | kubectl logs $PODNAME -n management-controller -f
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM python:3.8-slim
2 |
3 | WORKDIR /app
4 |
5 | COPY app.py /app
6 | COPY templates /app/templates
7 | COPY static /app/static
8 |
9 | RUN pip install Flask requests flask-cors
10 |
11 | CMD ["python", "app.py"]
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Introduction of OpenCSD-GUI-Assistant
2 | -------------
3 |
4 | KETI-Web-Workbench enables users to monitor databases, perform query pushdown, and run validator to analyze resource utilization and energy savings.
5 |
6 | ## Contents
7 | -------------
8 | [1. Requirement](#requirement)
9 |
10 | [2. How To Install](#How-To-Install)
11 |
12 | [3. How To Use](#How-To-Use)
13 |
14 | [4. Governance](#governance)
15 |
16 |
17 | ## Requirement
18 | -------------
19 | > Python 3.7.5
20 | > Flask 2.2.5
21 | > Werkzeug 2.2.3
22 |
23 |
24 | ## How To Install
25 | -------------
26 | ```bash
27 | git clone
28 | cd OpenCSD-GUI-Assistant
29 | ./1.build.sh
30 | ./2.create.sh
31 | python3 main.py
32 | ```
33 |
34 | ## How To Use
35 | -------------
36 | ### 1. Access a Web page
37 | ```bash
38 | http://{address}:40802
39 | ```
40 | 
41 |
42 | 1. Select DB Type
43 | - OpenCSD : RDBMS-based OpenCSD instance with query offloading capability
44 | - MySQL : Existing MySQL RDBMS
45 | - GraphDB : Existing Neo4j GraphDB
46 |
47 | 2. Set DB Root Password
48 | 3. Set DB Name : Default DB Name
49 | 4. Set Instance Name
50 |
51 | ### 2. Select Operation and Storage Node in Cluster
52 | Check and select the list of operation nodes and storage nodes within the cluster.
53 |
54 | 
55 |
56 | ### 3. Confirm Creation Info
57 | Finally check the set creation information and create an instance
58 |
59 | 
60 |
61 | ## Governance
62 | -------------
63 | This work was supported by Institute of Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government(MSIT) (No.2021-0-00862, Development of DBMS storage engine technology to minimize massive data movement)
64 |
65 |
--------------------------------------------------------------------------------
/app.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from flask import Flask, render_template, request
4 | from flask_cors import CORS
5 | import requests
6 |
7 | app = Flask(__name__,template_folder= 'templates')
8 | app.secret_key = 'ketidbms!'
9 | CORS(app)
10 |
11 | @app.route('/')
12 | def index():
13 | return render_template('index.html')
14 |
15 | @app.route('/create', methods=['POST'])
16 | def create():
17 | try:
18 | data = request.json
19 | # 전달 받을 데이터 무엇?
20 | #{'dbms_type': 'mysql', 'instance_name': 'test-name', 'volume': '1GB', 'root_password': '', 'instance_user': 'a', 'instance_password': 'a', 'dbms_user': '', 'dbms_password': '', 'create_validator': True}
21 | #{'dbms_type': 'opencsd', 'instance_name': 'ketidb', 'volume': '100GB', 'csd_count': '4', 'instance_user': 'a', 'instance_password': 'a','create_validator': True}
22 |
23 | print(data)
24 |
25 | # Send GUI Assistant API Server Request
26 | if data['dbms_type'] == "mysql":
27 | param = {"dbname":data['instance_name']}
28 | response = requests.get('http://10.0.4.87:40800/mysql/create', params=param)
29 | else:
30 | param = {"dbname":data['instance_name']}
31 | response = requests.get('http://10.0.4.87:40800/opencsd/create', params=param)
32 |
33 | if response.status_code == 200:
34 | # 응답 처리
35 | return "ok"
36 | else:
37 | # 에러 처리
38 | return "error"
39 | except:
40 | # 예외 처리
41 | return {}
42 |
43 | if __name__ == '__main__':
44 | app.run(host="0.0.0.0", port=40802, debug=True)
45 |
--------------------------------------------------------------------------------
/deploy/gui-assistant-deploy.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: opencsd-gui-assistant
5 | namespace: management-controller
6 | spec:
7 | replicas: 1
8 | selector:
9 | matchLabels:
10 | name: opencsd-gui-assistant
11 | namespace: management-controller
12 | template:
13 | metadata:
14 | labels:
15 | name: opencsd-gui-assistant
16 | namespace: management-controller
17 | spec:
18 | imagePullSecrets:
19 | - name: regcred
20 | containers:
21 | - name: opencsd-gui-assistant
22 | image: ketidevit2/opencsd-gui-assistant:v0.0.1
23 | imagePullPolicy: Always
24 | nodeSelector:
25 | key: master
26 |
--------------------------------------------------------------------------------
/deploy/gui-assistant-svc.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: opencsd-gui-assistant
5 | namespace: management-controller
6 | labels:
7 | name: opencsd-gui-assistant
8 | namespace: management-controller
9 | spec:
10 | type: NodePort
11 | ports:
12 | - port: 40802
13 | targetPort: 40802
14 | nodePort: 30802
15 | protocol: TCP
16 | selector:
17 | name: opencsd-gui-assistant
18 | namespace: management-controller
19 |
--------------------------------------------------------------------------------
/image/first.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/image/first.png
--------------------------------------------------------------------------------
/image/second.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/image/second.png
--------------------------------------------------------------------------------
/image/third.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/image/third.png
--------------------------------------------------------------------------------
/static/css/style.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "Muli-Regular";
3 | src: url("../fonts/muli/Muli-Regular.ttf"); }
4 | @font-face {
5 | font-family: "Muli-SemiBold";
6 | src: url("../fonts/muli/Muli-SemiBold.ttf"); }
7 | * {
8 | -webkit-box-sizing: border-box;
9 | -moz-box-sizing: border-box;
10 | box-sizing: border-box; }
11 |
12 | body {
13 | font-family: "Muli-Regular";
14 | font-size: 15px;
15 | color: #999;
16 | margin: 0; }
17 |
18 | :focus {
19 | outline: none; }
20 |
21 | textarea {
22 | resize: none; }
23 |
24 | input, textarea, select, button {
25 | font-family: "Muli-Regular";
26 | font-size: 15px; }
27 |
28 | p, h1, h2, h3, h4, h5, h6, ul {
29 | margin: 0; }
30 |
31 | ul {
32 | padding: 0;
33 | margin: 0;
34 | list-style: none; }
35 |
36 | a {
37 | text-decoration: none; }
38 |
39 | textarea {
40 | resize: none; }
41 |
42 | img {
43 | max-width: 100%; }
44 |
45 | .wrapper {
46 | height: 100vh;
47 | background: rgb(244 251 255);
48 | display: flex;
49 | align-items: center;
50 | justify-content: center; }
51 |
52 | .wizard {
53 | width: 920px;
54 | position: relative; }
55 |
56 | .wizard > .steps {
57 | position: absolute;
58 | top: 23%;
59 | right: 30%;
60 | transform: translateX(50%);
61 | transition: top 0.4s ease, right 0.4s ease, transform 0.4s ease;
62 | z-index: 9;
63 | }
64 |
65 | .wizard > .steps .current-info, .wizard > .steps .number {
66 | display: none; }
67 |
68 | .wizard > .steps ul {
69 | display: flex;
70 | justify-content: center; }
71 |
72 | .wizard > .steps li a {
73 | display: inline-block;
74 | width: 12px;
75 | height: 12px;
76 | border-radius: 50%;
77 | background: #e9e0cf;
78 | margin-right: 78px;
79 | position: relative; }
80 | .wizard > .steps li a:before {
81 | content: "";
82 | width: 58px;
83 | height: 2px;
84 | background: #e9e0cf;
85 | position: absolute;
86 | right: 22px;
87 | top: 5px; }
88 | .wizard > .steps li a:after {
89 | content: "";
90 | width: 0;
91 | height: 2px;
92 | background: #1f4cb7;
93 | position: absolute;
94 | left: -68px;
95 | top: 5px;
96 | transition: all 0.6s ease; }
97 | .wizard > .steps li.first a {
98 | background: #1f4cb7; }
99 | .wizard > .steps li.checked a {
100 | background: #1f4cb7; }
101 | .wizard > .steps li.checked a:after {
102 | width: 58px; }
103 | .wizard > .steps li:last-child a {
104 | margin-right: 0; }
105 | .wizard > .steps li:first-child a:before {
106 | display: none; }
107 | .wizard > .steps li:first-child a:after {
108 | display: none; }
109 |
110 | .wizard > .content {
111 | position: relative;
112 | height: 521px; }
113 |
114 | .inner {
115 | display: flex;
116 | background: #fff;
117 | box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
118 | -webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
119 | -moz-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
120 | -ms-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
121 | -o-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2); }
122 |
123 | .image-holder {
124 | width: 40%;
125 | height: 521px; }
126 |
127 | .form-content {
128 | width: 60%;
129 | padding-top: 50px;
130 | padding-left: 51px;
131 | padding-right: 51px; }
132 |
133 | .form-header {
134 | text-align: center; }
135 |
136 | h3 {
137 | font-family: "Muli-SemiBold";
138 | font-size: 22px;
139 | color: #453e79;
140 | text-transform: uppercase;
141 | letter-spacing: 7px;
142 | padding: 5px 15px;
143 | display: inline-block;
144 | border: 1px solid #dad8e4;
145 | margin-bottom: 75px; }
146 |
147 | p {
148 | font-family: "Muli-SemiBold";
149 | font-size: 20px;
150 | color: #2e4072;
151 | text-align: center;
152 | margin-bottom: 26px; }
153 |
154 | .form-row {
155 | display: flex;
156 | margin-bottom: 18px; }
157 | .form-row .form-holder {
158 | width: 50%;
159 | margin-right: 30px; }
160 | .form-row .form-holder:last-child {
161 | margin-right: 0; }
162 | .form-row .form-holder.w-100 {
163 | width: 100%;
164 | margin-right: 0; }
165 | .form-row .select {
166 | width: 50%;
167 | margin-right: 30px; }
168 | .form-row .select .form-holder {
169 | width: 100%;
170 | margin-right: 0; }
171 |
172 | .select {
173 | position: relative; }
174 | .select .select-control {
175 | height: 37px;
176 | border-bottom: 2px solid #e6e6e6;
177 | width: 100%;
178 | color: #999;
179 | display: flex;
180 | align-items: center;
181 | cursor: pointer; }
182 | .select .dropdown {
183 | display: none;
184 | position: absolute;
185 | top: 100%;
186 | width: 100%;
187 | background: #fff;
188 | z-index: 9;
189 | border: 1px solid #81acee; }
190 | .select .dropdown li {
191 | padding: 5px 10px; }
192 | .select .dropdown li:hover {
193 | background: #81acee;
194 | color: #fff; }
195 |
196 | .form-holder {
197 | position: relative; }
198 | .form-holder i {
199 | position: absolute;
200 | bottom: 7px;
201 | right: 0;
202 | font-size: 17px; }
203 | /* 드롭다운 스타일 */
204 | .form-control.dropdown {
205 | appearance: none; /* 기본 브라우저 스타일 제거 */
206 | -webkit-appearance: none;
207 | -moz-appearance: none;
208 | background: white url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"%3E%3Cpolyline points="6 9 12 15 18 9"%3E%3C/polyline%3E%3C/svg%3E') no-repeat right 10px center;
209 | padding: 10px;
210 | border: 1px solid #ccc;
211 | border-radius: 4px;
212 | width: 100%;
213 | font-size: 14px;
214 | color: #333;
215 | cursor: pointer;
216 | }
217 | /* 비활성화된 드롭다운 */
218 | .form-control.dropdown:disabled {
219 | background-color: #f5f5f5;
220 | cursor: not-allowed;
221 | color: #aaa;
222 | }
223 | /* 라벨 스타일 */
224 | .form-label {
225 | font-weight: bold;
226 | font-size: 14px;
227 | color: #333;
228 | margin-bottom: 5px;
229 | display: inline-block;
230 | }
231 |
232 | .success-message {
233 | position: fixed;
234 | top: 30%;
235 | left: 50%;
236 | transform: translate(-50%, -50%);
237 | background-color: #94c4ff; /* 원하는 배경색 */
238 | color: #453e79; /* 글씨 색상 */
239 | font-family: "Muli-SemiBold", sans-serif; /* 폰트 스타일 */
240 | font-size: 22px; /* 글씨 크기 */
241 | text-transform: uppercase; /* 대문자 변환 */
242 | letter-spacing: 7px; /* 글자 간격 */
243 | padding: 5px 15px; /* 패딩 */
244 | display: inline-block; /* 인라인 블록 요소 */
245 | border-radius: 12px; /* 둥근 모서리 */
246 | margin-bottom: 0px; /* 아래 여백 */
247 | text-align: center;
248 | z-index: 9999;
249 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 부드러운 그림자 */
250 | animation: fadeIn 1s ease-out; /* 애니메이션 추가 */
251 | }
252 |
253 | .success-message span {
254 | display: block;
255 | margin-top: 10px; /* 텍스트와 아이콘 사이에 여백 추가 */
256 | }
257 |
258 | .backdrop {
259 | position: fixed;
260 | top: 0;
261 | left: 0;
262 | width: 100%;
263 | height: 100%;
264 | background-color: rgba(0, 0, 0, 0.5);
265 | z-index: 9998;
266 | }
267 |
268 | /* 애니메이션 */
269 | @keyframes fadeIn {
270 | 0% {
271 | opacity: 0;
272 | transform: translate(-50%, -60%);
273 | }
274 | 100% {
275 | opacity: 1;
276 | transform: translate(-50%, -50%);
277 | }
278 | }
279 |
280 |
281 |
282 | .form-control {
283 | height: 37px;
284 | border: none;
285 | border-bottom: 2px solid #e6e6e6;
286 | width: 100%;
287 | color: #666; }
288 | .form-control:focus {
289 | border-color: #e9e0cf; }
290 | .form-control::-webkit-input-placeholder {
291 | color: #999; }
292 | .form-control::-moz-placeholder {
293 | color: #999; }
294 | .form-control:-ms-input-placeholder {
295 | color: #999; }
296 | .form-control:-moz-placeholder {
297 | color: #999; }
298 |
299 | select.form-control {
300 | -moz-appearance: none;
301 | -webkit-appearance: none;
302 | cursor: pointer;
303 | color: #999; }
304 | select.form-control option[value=""][disabled] {
305 | display: none; }
306 |
307 | textarea.form-control {
308 | padding: 8px 0;
309 | background: url("../images/textarea-bg.png") no-repeat right bottom 3px; }
310 |
311 | .actions {
312 | position: absolute;
313 | bottom: 30px;
314 | right: 51px; }
315 | .actions ul {
316 | display: flex; }
317 | .actions li a {
318 | padding: 0;
319 | border: none;
320 | display: inline-flex;
321 | height: 41px;
322 | width: 135px;
323 | align-items: center;
324 | background: #557eac;
325 | font-family: "Muli-SemiBold";
326 | color: #f0f0f0;
327 | cursor: pointer;
328 | position: relative;
329 | padding-left: 28px; }
330 | .actions li a:before {
331 | content: '\f301';
332 | position: absolute;
333 | top: 14px;
334 | right: 28px;
335 | font-family: Material-Design-Iconic-Font; }
336 | .actions li a:hover {
337 | background: #214f83; }
338 | .actions li:first-child a {
339 | width: 144px;
340 | padding-left: 48px; }
341 | .actions li:first-child a:before {
342 | content: '\f2ff';
343 | position: absolute;
344 | top: 14px;
345 | left: 26px;
346 | font-family: Material-Design-Iconic-Font; }
347 | .actions li:nth-child(2) a, .actions li:last-child a {
348 | margin-left: 20px; }
349 | .actions li:last-child a {
350 | width: 124px;
351 | background: #557eac;
352 | color: #f0f0f0; }
353 | .actions li:last-child a:hover {
354 | background: #214f83; }
355 | .actions li:last-child a:before {
356 | content: '\f26b';
357 | position: absolute;
358 | top: 13px;
359 | right: 28px;
360 | font-family: Material-Design-Iconic-Font; }
361 | .actions li[aria-disabled="true"] a {
362 | opacity: 0;
363 | transition: all 1s; }
364 | .actions li[aria-disabled="false"] ~ li a {
365 | background: #557eac;
366 | color: #fff; }
367 | .actions li[aria-disabled="false"] ~ li a:hover {
368 | background: #214f83; }
369 |
370 | .checkbox-tick label {
371 | cursor: pointer;
372 | display: inline-block;
373 | padding-left: 23px;
374 | position: relative; }
375 | .checkbox-tick label.male {
376 | margin-right: 26px; }
377 | .checkbox-tick input {
378 | position: absolute;
379 | opacity: 0;
380 | cursor: pointer; }
381 | .checkbox-tick input:checked ~ .checkmark {
382 | background: #999; }
383 | .checkbox-tick input:checked ~ .checkmark:after {
384 | display: block; }
385 | .checkbox-tick .checkmark {
386 | position: absolute;
387 | top: 3px;
388 | left: 0;
389 | height: 13px;
390 | width: 13px;
391 | border: 1px solid #999;
392 | border-radius: 50%;
393 | font-family: Material-Design-Iconic-Font;
394 | color: #fff;
395 | font-size: 11px; }
396 | .checkbox-tick .checkmark:after {
397 | top: 0;
398 | left: 2px;
399 | position: absolute;
400 | display: none;
401 | content: '\f26b'; }
402 |
403 | .checkbox-circle {
404 | position: relative;
405 | padding-left: 23px;
406 | margin-top: 41px;
407 | width: 63%; }
408 | .checkbox-circle.mt-24 {
409 | margin-top: 24px; }
410 | .checkbox-circle label {
411 | cursor: pointer;
412 | color: #999;
413 | font-size: 13px;
414 | line-height: 1.9;
415 | transform: translateY(-5px); }
416 | .checkbox-circle label a {
417 | color: #1f4cb7; }
418 | .checkbox-circle label a:hover {
419 | color: #1f4cb7; }
420 | .checkbox-circle input {
421 | position: absolute;
422 | opacity: 0;
423 | cursor: pointer; }
424 | .checkbox-circle input:checked ~ .checkmark:after {
425 | display: block; }
426 | .checkbox-circle .checkmark {
427 | position: absolute;
428 | top: 6px;
429 | left: 0;
430 | height: 13px;
431 | width: 13px;
432 | border-radius: 50%;
433 | border: 1px solid #999; }
434 | .checkbox-circle .checkmark:after {
435 | content: "";
436 | top: 2px;
437 | left: 2px;
438 | width: 7px;
439 | height: 7px;
440 | border-radius: 50%;
441 | background: #999;
442 | position: absolute;
443 | display: none; }
444 |
445 | @media (max-width: 991px) {
446 | .wizard {
447 | max-width: 768px; }
448 |
449 | .image-holder img {
450 | height: 521px;
451 | object-fit: cover; } }
452 | @media (max-width: 767px) {
453 | .inner {
454 | display: block;
455 | box-shadow: none;
456 | -webkit-box-shadow: none;
457 | -moz-box-shadow: none;
458 | -ms-box-shadow: none;
459 | -o-box-shadow: none; }
460 |
461 | .image-holder {
462 | width: 100%; }
463 | .image-holder img {
464 | width: 100%; }
465 |
466 | .form-content {
467 | width: 100%;
468 | padding: 50px 20px 30px; }
469 |
470 | .form-row {
471 | display: block; }
472 | .form-row .form-holder, .form-row .select {
473 | width: 100%;
474 | margin-right: 0;
475 | margin-bottom: 18px; }
476 |
477 | .wrapper {
478 | height: 1201px;
479 | background: none; }
480 |
481 | .checkbox-circle {
482 | width: 100%; }
483 |
484 | .wizard {
485 | height: 100%; }
486 | .wizard > .steps {
487 | right: 50%;
488 | top: 52%;
489 | transform: translateX(50%); }
490 |
491 | .actions {
492 | right: 50%;
493 | transform: translateX(50%);
494 | bottom: 3%; } }
495 |
496 | /*# sourceMappingURL=style.css.map */
497 |
--------------------------------------------------------------------------------
/static/css/style.css.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "mappings": "AAAA,UAGC;EAFA,WAAW,EAAE,cAAc;EAC3B,GAAG,EAAE,qCAAqC;AAE3C,UAGC;EAFA,WAAW,EAAE,eAAe;EAC5B,GAAG,EAAE,sCAAsC;AAE5C,CAAE;EACA,kBAAkB,EAAE,UAAU;EAC9B,eAAe,EAAE,UAAU;EAC3B,UAAU,EAAE,UAAU;;AAExB,IAAK;EACJ,WAAW,EAAE,cAAc;EAC3B,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,CAAC;;AAEV,MAAO;EACN,OAAO,EAAE,IAAI;;AAEd,QAAS;EACR,MAAM,EAAE,IAAI;;AAEb,+BAAgC;EAC/B,WAAW,EAAE,cAAc;EAC3B,SAAS,EAAE,IAAI;;AAEhB,6BAA8B;EAC7B,MAAM,EAAE,CAAC;;AAEV,EAAG;EACF,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EACT,UAAU,EAAE,IAAI;;AA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
6 | "file": "style.css"
7 | }
8 |
--------------------------------------------------------------------------------
/static/css/style.scss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "Muli-Regular";
3 | src: url('../fonts/muli/Muli-Regular.ttf');
4 | }
5 | @font-face {
6 | font-family: "Muli-SemiBold";
7 | src: url('../fonts/muli/Muli-SemiBold.ttf');
8 | }
9 | * {
10 | -webkit-box-sizing: border-box;
11 | -moz-box-sizing: border-box;
12 | box-sizing: border-box;
13 | }
14 | body {
15 | font-family: "Muli-Regular";
16 | font-size: 15px;
17 | color: #999;
18 | margin: 0;
19 | }
20 | :focus {
21 | outline: none;
22 | }
23 | textarea {
24 | resize: none;
25 | }
26 | input, textarea, select, button {
27 | font-family: "Muli-Regular";
28 | font-size: 15px;
29 | }
30 | p, h1, h2, h3, h4, h5, h6, ul {
31 | margin: 0;
32 | }
33 | ul {
34 | padding: 0;
35 | margin: 0;
36 | list-style: none;
37 | }
38 | a {
39 | text-decoration: none;
40 | }
41 | textarea {
42 | resize: none;
43 | }
44 | img {
45 | max-width: 100%;
46 | }
47 | .wrapper {
48 | height: 100vh;
49 | background: #f9f6f1;
50 | display: flex;
51 | align-items: center;
52 | justify-content: center;
53 | }
54 | .wizard {
55 | width: 920px;
56 | position: relative;
57 | }
58 | .wizard > .steps {
59 | position: absolute;
60 | top: 27.44%;
61 | right: 30%;
62 | transform: translateX(50%);
63 | z-index: 9;
64 | }
65 | .wizard > .steps .current-info, .wizard > .steps .number {
66 | display: none;
67 | }
68 | .wizard > .steps ul {
69 | display: flex;
70 | justify-content: center;
71 | }
72 | .wizard > .steps li {
73 | a {
74 | display: inline-block;
75 | width: 12px;
76 | height: 12px;
77 | border-radius: 50%;
78 | background: #e9e0cf;
79 | margin-right: 78px;
80 | position: relative;
81 | &:before {
82 | content: "";
83 | width: 58px;
84 | height: 2px;
85 | background: #e9e0cf;
86 | position: absolute;
87 | right: 22px;
88 | top: 5px;
89 | }
90 | &:after {
91 | content: "";
92 | width: 0;
93 | height: 2px;
94 | background: #6d7f52;
95 | position: absolute;
96 | left: -68px;
97 | top: 5px;
98 | transition: all 0.6s ease;
99 | }
100 | }
101 | &.first {
102 | a {
103 | background: #6d7f52;
104 | }
105 | }
106 | &.checked {
107 | a {
108 | background: #6d7f52;
109 | &:after {
110 | width: 58px;
111 | }
112 | }
113 | }
114 | &:last-child {
115 | a {
116 | margin-right: 0;
117 | }
118 | }
119 | &:first-child {
120 | a {
121 | &:before {
122 | display: none;
123 | }
124 | &:after {
125 | display: none;
126 | }
127 | }
128 | }
129 | }
130 | .wizard > .content {
131 | position: relative;
132 | height: 521px;
133 | }
134 | .inner {
135 | display: flex;
136 | background: #fff;
137 | box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
138 | -webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
139 | -moz-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
140 | -ms-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
141 | -o-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.2);
142 | }
143 | .image-holder {
144 | width: 40%;
145 | height: 521px;
146 | }
147 | .form-content {
148 | width: 60%;
149 | padding-top: 65px;
150 | padding-left: 51px;
151 | padding-right: 51px;
152 | }
153 | .form-header {
154 | text-align: center;
155 | }
156 | h3 {
157 | font-family: "Muli-SemiBold";
158 | font-size: 22px;
159 | color: #453e79;
160 | text-transform: uppercase;
161 | letter-spacing: 7px;
162 | padding: 5px 15px;
163 | display: inline-block;
164 | border: 1px solid #dad8e4;
165 | margin-bottom: 75px;
166 | }
167 | p {
168 | font-family: "Muli-SemiBold";
169 | font-size: 20px;
170 | color: #6d7f52;
171 | text-align: center;
172 | margin-bottom: 26px;
173 | }
174 | .form-row {
175 | display: flex;
176 | margin-bottom: 18px;
177 | .form-holder {
178 | width: 50%;
179 | margin-right: 30px;
180 | &:last-child {
181 | margin-right: 0;
182 | }
183 | &.w-100 {
184 | width: 100%;
185 | margin-right: 0;
186 | }
187 | }
188 | .select {
189 | width: 50%;
190 | margin-right: 30px;
191 | .form-holder {
192 | width: 100%;
193 | margin-right: 0;
194 | }
195 | }
196 | }
197 | .select {
198 | position: relative;
199 | .select-control {
200 | height: 37px;
201 | border-bottom: 2px solid #e6e6e6;
202 | width: 100%;
203 | color: #999;
204 | display: flex;
205 | align-items: center;
206 | cursor: pointer;
207 | }
208 | .dropdown {
209 | display: none;
210 | position: absolute;
211 | top: 100%;
212 | width: 100%;
213 | background: #fff;
214 | z-index: 9;
215 | border: 1px solid #81acee;
216 | li {
217 | padding: 5px 10px;
218 | &:hover {
219 | background: #81acee;
220 | color: #fff;
221 | }
222 | }
223 | }
224 | }
225 | .form-holder {
226 | position: relative;
227 | i {
228 | position: absolute;
229 | bottom: 7px;
230 | right: 0;
231 | font-size: 17px;
232 | }
233 | }
234 | .form-control {
235 | height: 37px;
236 | border: none;
237 | border-bottom: 2px solid #e6e6e6;
238 | width: 100%;
239 | color: #666;
240 | &:focus {
241 | border-color: #e9e0cf;
242 | }
243 | &::-webkit-input-placeholder {
244 | color: #999;
245 | }
246 | &::-moz-placeholder {
247 | color: #999;
248 | }
249 | &:-ms-input-placeholder {
250 | color: #999;
251 | }
252 | &:-moz-placeholder {
253 | color: #999;
254 | }
255 | }
256 | select.form-control {
257 | -moz-appearance: none;
258 | -webkit-appearance: none;
259 | cursor: pointer;
260 | color: #999;
261 | option[value=""][disabled] {
262 | display: none;
263 | }
264 | }
265 | textarea.form-control {
266 | padding: 8px 0;
267 | background: url('../images/textarea-bg.png') no-repeat right bottom 3px;
268 | }
269 | .actions {
270 | position: absolute;
271 | bottom: 55px;
272 | right: 51px;
273 | ul {
274 | display: flex;
275 | }
276 | li {
277 | a {
278 | padding: 0;
279 | border: none;
280 | display: inline-flex;
281 | height: 41px;
282 | width: 135px;
283 | align-items: center;
284 | background: #e9e0cf;
285 | font-family: "Muli-SemiBold";
286 | color: #666;
287 | cursor: pointer;
288 | position: relative;
289 | padding-left: 28px;
290 | &:before {
291 | content: '\f301';
292 | position: absolute;
293 | top: 14px;
294 | right: 28px;
295 | font-family: Material-Design-Iconic-Font;
296 | }
297 | &:hover {
298 | background: #cfc7b8;
299 | }
300 | }
301 | &:first-child {
302 | a {
303 | width: 144px;
304 | padding-left: 48px;
305 | &:before {
306 | content: '\f2ff';
307 | position: absolute;
308 | top: 14px;
309 | left: 26px;
310 | font-family: Material-Design-Iconic-Font;
311 | }
312 | }
313 | }
314 | &:nth-child(2), &:last-child {
315 | a {
316 | margin-left: 20px;
317 | }
318 | }
319 | &:last-child {
320 | a {
321 | width: 124px;
322 | background: #6d7f52;
323 | color: #fff;
324 | &:hover {
325 | background: #849963;
326 | }
327 | &:before {
328 | content: '\f26b';
329 | position: absolute;
330 | top: 13px;
331 | right: 28px;
332 | font-family: Material-Design-Iconic-Font;
333 | }
334 | }
335 | }
336 | &[aria-disabled="true"] {
337 | a {
338 | opacity: 0;
339 | transition: all 1s;
340 | }
341 | }
342 | &[aria-disabled="false"] {
343 | & ~ li {
344 | a {
345 | background: #6d7f52;
346 | color: #fff;
347 | &:hover {
348 | background: #849963;
349 | }
350 | }
351 | }
352 | }
353 | }
354 | }
355 |
356 | .checkbox-tick {
357 | label {
358 | cursor: pointer;
359 | display: inline-block;
360 | padding-left: 23px;
361 | position: relative;
362 | &.male {
363 | margin-right: 26px;
364 | }
365 | }
366 | input {
367 | position: absolute;
368 | opacity: 0;
369 | cursor: pointer;
370 | }
371 | input:checked {
372 | & ~ .checkmark {
373 | background: #999;
374 | &:after {
375 | display: block;
376 | }
377 | }
378 | }
379 | .checkmark {
380 | position: absolute;
381 | top: 3px;
382 | left: 0;
383 | height: 13px;
384 | width: 13px;
385 | border: 1px solid #999;
386 | border-radius: 50%;
387 | font-family: Material-Design-Iconic-Font;
388 | color: #fff;
389 | font-size: 11px;
390 | &:after {
391 | top: 0;
392 | left: 2px;
393 | position: absolute;
394 | display: none;
395 | content: '\f26b';
396 | }
397 | }
398 | }
399 | .checkbox-circle {
400 | position: relative;
401 | padding-left: 23px;
402 | margin-top: 41px;
403 | width: 63%;
404 | &.mt-24 {
405 | margin-top: 24px;
406 | }
407 | label {
408 | cursor: pointer;
409 | color: #999;
410 | font-size: 13px;
411 | line-height: 1.9;
412 | transform: translateY(-5px);
413 | a {
414 | color: #6d7f52;
415 | &:hover {
416 | color: #89b843;
417 | }
418 | }
419 | }
420 | input {
421 | position: absolute;
422 | opacity: 0;
423 | cursor: pointer;
424 | }
425 | input:checked ~ .checkmark:after {
426 | display: block;
427 | }
428 | .checkmark {
429 | position: absolute;
430 | top: 6px;
431 | left: 0;
432 | height: 13px;
433 | width: 13px;
434 | border-radius: 50%;
435 | border: 1px solid #999;
436 | &:after {
437 | content: "";
438 | top: 2px;
439 | left: 2px;
440 | width: 7px;
441 | height: 7px;
442 | border-radius: 50%;
443 | background: #999;
444 | position: absolute;
445 | display: none;
446 | }
447 | }
448 | }
449 | @media (max-width: 1199px) {
450 |
451 | }
452 | @media (max-width: 991px) {
453 | .wizard {
454 | max-width: 768px;
455 | }
456 | .image-holder {
457 | img {
458 | height: 521px;
459 | object-fit: cover;
460 | }
461 | }
462 |
463 | }
464 | @media (max-width: 767px) {
465 | .inner {
466 | display: block;
467 | box-shadow: none;
468 | -webkit-box-shadow: none;
469 | -moz-box-shadow: none;
470 | -ms-box-shadow: none;
471 | -o-box-shadow: none;
472 | }
473 | .image-holder {
474 | width: 100%;
475 | img {
476 | width: 100%;
477 | }
478 | }
479 | .form-content {
480 | width: 100%;
481 | padding: 50px 20px 30px;
482 | }
483 | .form-row {
484 | display: block;
485 | .form-holder, .select {
486 | width: 100%;
487 | margin-right: 0;
488 | margin-bottom: 18px;
489 | }
490 | }
491 | .wrapper {
492 | height: 1201px;
493 | background: none;
494 | }
495 | .checkbox-circle {
496 | width: 100%;
497 | }
498 | .wizard {
499 | height: 100%;
500 | & > .steps {
501 | right: 50%;
502 | top: 52%;
503 | transform: translateX(50%);
504 | }
505 | }
506 | .actions {
507 | right: 50%;
508 | transform: translateX(50%);
509 | bottom: 3%;
510 | }
511 | }
512 |
513 |
--------------------------------------------------------------------------------
/static/fonts/material-design-iconic-font/fonts/Material-Design-Iconic-Font.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/material-design-iconic-font/fonts/Material-Design-Iconic-Font.eot
--------------------------------------------------------------------------------
/static/fonts/material-design-iconic-font/fonts/Material-Design-Iconic-Font.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/material-design-iconic-font/fonts/Material-Design-Iconic-Font.ttf
--------------------------------------------------------------------------------
/static/fonts/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff
--------------------------------------------------------------------------------
/static/fonts/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff2
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-Black.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-BlackItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-BlackItalic.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-Bold.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-BoldItalic.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-ExtraBold.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-ExtraBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-ExtraBoldItalic.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-ExtraLight.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-ExtraLightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-ExtraLightItalic.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-Italic.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-Light.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-LightItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-LightItalic.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-SemiBold.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/Muli-SemiBoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/fonts/muli/Muli-SemiBoldItalic.ttf
--------------------------------------------------------------------------------
/static/fonts/muli/OFL.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016 The Muli Project Authors (contact@sansoxygen.com)
2 |
3 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
4 | This license is copied below, and is also available with a FAQ at:
5 | http://scripts.sil.org/OFL
6 |
7 |
8 | -----------------------------------------------------------
9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10 | -----------------------------------------------------------
11 |
12 | PREAMBLE
13 | The goals of the Open Font License (OFL) are to stimulate worldwide
14 | development of collaborative font projects, to support the font creation
15 | efforts of academic and linguistic communities, and to provide a free and
16 | open framework in which fonts may be shared and improved in partnership
17 | with others.
18 |
19 | The OFL allows the licensed fonts to be used, studied, modified and
20 | redistributed freely as long as they are not sold by themselves. The
21 | fonts, including any derivative works, can be bundled, embedded,
22 | redistributed and/or sold with any software provided that any reserved
23 | names are not used by derivative works. The fonts and derivatives,
24 | however, cannot be released under any other type of license. The
25 | requirement for fonts to remain under this license does not apply
26 | to any document created using the fonts or their derivatives.
27 |
28 | DEFINITIONS
29 | "Font Software" refers to the set of files released by the Copyright
30 | Holder(s) under this license and clearly marked as such. This may
31 | include source files, build scripts and documentation.
32 |
33 | "Reserved Font Name" refers to any names specified as such after the
34 | copyright statement(s).
35 |
36 | "Original Version" refers to the collection of Font Software components as
37 | distributed by the Copyright Holder(s).
38 |
39 | "Modified Version" refers to any derivative made by adding to, deleting,
40 | or substituting -- in part or in whole -- any of the components of the
41 | Original Version, by changing formats or by porting the Font Software to a
42 | new environment.
43 |
44 | "Author" refers to any designer, engineer, programmer, technical
45 | writer or other person who contributed to the Font Software.
46 |
47 | PERMISSION & CONDITIONS
48 | Permission is hereby granted, free of charge, to any person obtaining
49 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
50 | redistribute, and sell modified and unmodified copies of the Font
51 | Software, subject to the following conditions:
52 |
53 | 1) Neither the Font Software nor any of its individual components,
54 | in Original or Modified Versions, may be sold by itself.
55 |
56 | 2) Original or Modified Versions of the Font Software may be bundled,
57 | redistributed and/or sold with any software, provided that each copy
58 | contains the above copyright notice and this license. These can be
59 | included either as stand-alone text files, human-readable headers or
60 | in the appropriate machine-readable metadata fields within text or
61 | binary files as long as those fields can be easily viewed by the user.
62 |
63 | 3) No Modified Version of the Font Software may use the Reserved Font
64 | Name(s) unless explicit written permission is granted by the corresponding
65 | Copyright Holder. This restriction only applies to the primary font name as
66 | presented to the users.
67 |
68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69 | Software shall not be used to promote, endorse or advertise any
70 | Modified Version, except to acknowledge the contribution(s) of the
71 | Copyright Holder(s) and the Author(s) or with their explicit written
72 | permission.
73 |
74 | 5) The Font Software, modified or unmodified, in part or in whole,
75 | must be distributed entirely under this license, and must not be
76 | distributed under any other license. The requirement for fonts to
77 | remain under this license does not apply to any document created
78 | using the Font Software.
79 |
80 | TERMINATION
81 | This license becomes null and void if any of the above conditions are
82 | not met.
83 |
84 | DISCLAIMER
85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93 | OTHER DEALINGS IN THE FONT SOFTWARE.
94 |
--------------------------------------------------------------------------------
/static/images/gui-assistant.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/images/gui-assistant.jpg
--------------------------------------------------------------------------------
/static/images/image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opencsd/OpenCSD-GUI-Assistant/be4db3ce0a575fd9d611b97a1ef5b56471450bb4/static/images/image1.png
--------------------------------------------------------------------------------
/static/js/jquery.steps.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery Steps v1.1.0 - 09/04/2014
3 | * Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com)
4 | * Licensed under MIT http://www.opensource.org/licenses/MIT
5 | */
6 | ;(function ($, undefined)
7 | {
8 | $.fn.extend({
9 | _aria: function (name, value)
10 | {
11 | return this.attr("aria-" + name, value);
12 | },
13 |
14 | _removeAria: function (name)
15 | {
16 | return this.removeAttr("aria-" + name);
17 | },
18 |
19 | _enableAria: function (enable)
20 | {
21 | return (enable == null || enable) ?
22 | this.removeClass("disabled")._aria("disabled", "false") :
23 | this.addClass("disabled")._aria("disabled", "true");
24 | },
25 |
26 | _showAria: function (show)
27 | {
28 | return (show == null || show) ?
29 | this.show()._aria("hidden", "false") :
30 | this.hide()._aria("hidden", "true");
31 | },
32 |
33 | _selectAria: function (select)
34 | {
35 | return (select == null || select) ?
36 | this.addClass("current")._aria("selected", "true") :
37 | this.removeClass("current")._aria("selected", "false");
38 | },
39 |
40 | _id: function (id)
41 | {
42 | return (id) ? this.attr("id", id) : this.attr("id");
43 | }
44 | });
45 |
46 | if (!String.prototype.format)
47 | {
48 | String.prototype.format = function()
49 | {
50 | var args = (arguments.length === 1 && $.isArray(arguments[0])) ? arguments[0] : arguments;
51 | var formattedString = this;
52 | for (var i = 0; i < args.length; i++)
53 | {
54 | var pattern = new RegExp("\\{" + i + "\\}", "gm");
55 | formattedString = formattedString.replace(pattern, args[i]);
56 | }
57 | return formattedString;
58 | };
59 | }
60 |
61 | /**
62 | * A global unique id count.
63 | *
64 | * @static
65 | * @private
66 | * @property _uniqueId
67 | * @type Integer
68 | **/
69 | var _uniqueId = 0;
70 |
71 | /**
72 | * The plugin prefix for cookies.
73 | *
74 | * @final
75 | * @private
76 | * @property _cookiePrefix
77 | * @type String
78 | **/
79 | var _cookiePrefix = "jQu3ry_5teps_St@te_";
80 |
81 | /**
82 | * Suffix for the unique tab id.
83 | *
84 | * @final
85 | * @private
86 | * @property _tabSuffix
87 | * @type String
88 | * @since 0.9.7
89 | **/
90 | var _tabSuffix = "-t-";
91 |
92 | /**
93 | * Suffix for the unique tabpanel id.
94 | *
95 | * @final
96 | * @private
97 | * @property _tabpanelSuffix
98 | * @type String
99 | * @since 0.9.7
100 | **/
101 | var _tabpanelSuffix = "-p-";
102 |
103 | /**
104 | * Suffix for the unique title id.
105 | *
106 | * @final
107 | * @private
108 | * @property _titleSuffix
109 | * @type String
110 | * @since 0.9.7
111 | **/
112 | var _titleSuffix = "-h-";
113 |
114 | /**
115 | * An error message for an "index out of range" error.
116 | *
117 | * @final
118 | * @private
119 | * @property _indexOutOfRangeErrorMessage
120 | * @type String
121 | **/
122 | var _indexOutOfRangeErrorMessage = "Index out of range.";
123 |
124 | /**
125 | * An error message for an "missing corresponding element" error.
126 | *
127 | * @final
128 | * @private
129 | * @property _missingCorrespondingElementErrorMessage
130 | * @type String
131 | **/
132 | var _missingCorrespondingElementErrorMessage = "One or more corresponding step {0} are missing.";
133 |
134 | /**
135 | * Adds a step to the cache.
136 | *
137 | * @static
138 | * @private
139 | * @method addStepToCache
140 | * @param wizard {Object} A jQuery wizard object
141 | * @param step {Object} The step object to add
142 | **/
143 | function addStepToCache(wizard, step)
144 | {
145 | getSteps(wizard).push(step);
146 | }
147 |
148 | function analyzeData(wizard, options, state)
149 | {
150 | var stepTitles = wizard.children(options.headerTag),
151 | stepContents = wizard.children(options.bodyTag);
152 |
153 | // Validate content
154 | if (stepTitles.length > stepContents.length)
155 | {
156 | throwError(_missingCorrespondingElementErrorMessage, "contents");
157 | }
158 | else if (stepTitles.length < stepContents.length)
159 | {
160 | throwError(_missingCorrespondingElementErrorMessage, "titles");
161 | }
162 |
163 | var startIndex = options.startIndex;
164 |
165 | state.stepCount = stepTitles.length;
166 |
167 | // Tries to load the saved state (step position)
168 | if (options.saveState && $.cookie)
169 | {
170 | var savedState = $.cookie(_cookiePrefix + getUniqueId(wizard));
171 | // Sets the saved position to the start index if not undefined or out of range
172 | var savedIndex = parseInt(savedState, 0);
173 | if (!isNaN(savedIndex) && savedIndex < state.stepCount)
174 | {
175 | startIndex = savedIndex;
176 | }
177 | }
178 |
179 | state.currentIndex = startIndex;
180 |
181 | stepTitles.each(function (index)
182 | {
183 | var item = $(this), // item == header
184 | content = stepContents.eq(index),
185 | modeData = content.data("mode"),
186 | mode = (modeData == null) ? contentMode.html : getValidEnumValue(contentMode,
187 | (/^\s*$/.test(modeData) || isNaN(modeData)) ? modeData : parseInt(modeData, 0)),
188 | contentUrl = (mode === contentMode.html || content.data("url") === undefined) ?
189 | "" : content.data("url"),
190 | contentLoaded = (mode !== contentMode.html && content.data("loaded") === "1"),
191 | step = $.extend({}, stepModel, {
192 | title: item.html(),
193 | content: (mode === contentMode.html) ? content.html() : "",
194 | contentUrl: contentUrl,
195 | contentMode: mode,
196 | contentLoaded: contentLoaded
197 | });
198 |
199 | addStepToCache(wizard, step);
200 | });
201 | }
202 |
203 | /**
204 | * Triggers the onCanceled event.
205 | *
206 | * @static
207 | * @private
208 | * @method cancel
209 | * @param wizard {Object} The jQuery wizard object
210 | **/
211 | function cancel(wizard)
212 | {
213 | wizard.triggerHandler("canceled");
214 | }
215 |
216 | function decreaseCurrentIndexBy(state, decreaseBy)
217 | {
218 | return state.currentIndex - decreaseBy;
219 | }
220 |
221 | /**
222 | * Removes the control functionality completely and transforms the current state to the initial HTML structure.
223 | *
224 | * @static
225 | * @private
226 | * @method destroy
227 | * @param wizard {Object} A jQuery wizard object
228 | **/
229 | function destroy(wizard, options)
230 | {
231 | var eventNamespace = getEventNamespace(wizard);
232 |
233 | // Remove virtual data objects from the wizard
234 | wizard.unbind(eventNamespace).removeData("uid").removeData("options")
235 | .removeData("state").removeData("steps").removeData("eventNamespace")
236 | .find(".actions a").unbind(eventNamespace);
237 |
238 | // Remove attributes and CSS classes from the wizard
239 | wizard.removeClass(options.clearFixCssClass + " vertical");
240 |
241 | var contents = wizard.find(".content > *");
242 |
243 | // Remove virtual data objects from panels and their titles
244 | contents.removeData("loaded").removeData("mode").removeData("url");
245 |
246 | // Remove attributes, CSS classes and reset inline styles on all panels and their titles
247 | contents.removeAttr("id").removeAttr("role").removeAttr("tabindex")
248 | .removeAttr("class").removeAttr("style")._removeAria("labelledby")
249 | ._removeAria("hidden");
250 |
251 | // Empty panels if the mode is set to 'async' or 'iframe'
252 | wizard.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty();
253 |
254 | var wizardSubstitute = $("<{0} class=\"{1}\">{0}>".format(wizard.get(0).tagName, wizard.attr("class")));
255 |
256 | var wizardId = wizard._id();
257 | if (wizardId != null && wizardId !== "")
258 | {
259 | wizardSubstitute._id(wizardId);
260 | }
261 |
262 | wizardSubstitute.html(wizard.find(".content").html());
263 | wizard.after(wizardSubstitute);
264 | wizard.remove();
265 |
266 | return wizardSubstitute;
267 | }
268 |
269 | // /**
270 | // * Triggers the onFinishing and onFinished event.
271 | // *
272 | // * @static
273 | // * @private
274 | // * @method finishStep
275 | // * @param wizard {Object} The jQuery wizard object
276 | // * @param state {Object} The state container of the current wizard
277 | // **/
278 | // function finishStep(wizard, state)
279 | // {
280 | // var currentStep = wizard.find(".steps li").eq(state.currentIndex);
281 |
282 | // if (wizard.triggerHandler("finishing", [state.currentIndex]))
283 | // {
284 | // currentStep.addClass("done").removeClass("error");
285 | // wizard.triggerHandler("finished", [state.currentIndex]);
286 |
287 | // if(dbmsType == "mysql"){
288 | // fetch('/create', {
289 | // method: 'POST',
290 | // mode: 'cors',
291 | // headers: {
292 | // 'Content-Type': 'application/json',
293 | // },
294 | // redirect: 'follow',
295 | // body: JSON.stringify({
296 | // "dbms_type": dbmsType,
297 | // "instance_name": $('input[name=confirmInstanceName]').val(),
298 | // "instance_user": $('#instanceUser').val(),
299 | // "instance_password": $('#instancePassword').val(),
300 | // "volume": $('input[name=confirmVolumeAllocate]').val(),
301 | // "root_password": $('#rootpwd').val(),
302 | // "dbms_user": $('#user').val(),
303 | // "dbms_password": $('#userpwd').val(),
304 | // "create_validator": $('#mysqlValidator').is(':checked')
305 | // })
306 | // })
307 | // .then(response => response)
308 | // }else{
309 | // fetch('/create', {
310 | // method: 'POST',
311 | // mode: 'cors',
312 | // headers: {
313 | // 'Content-Type': 'application/json',
314 | // },
315 | // redirect: 'follow',
316 | // body: JSON.stringify({
317 | // "dbms_type": dbmsType,
318 | // "instance_name": $('input[name=confirmInstanceName]').val(),
319 | // "instance_user": $('#instanceUser').val(),
320 | // "instance_password": $('#instancePassword').val(),
321 | // "volume": $('input[name=confirmVolumeAllocate]').val(),
322 | // "csd_count": $('input[name=confirmCSDCount]').val(),
323 | // "create_validator": $('#opencsdValidator').is(':checked')
324 | // })
325 | // })
326 | // .then(response => response)
327 | // }
328 |
329 | // alert("Instance Create Success");
330 | // // initialize.apply($('#wizard'), arguments);
331 | // // $('#wizard').initialize(arguments);
332 | // }
333 | // else
334 | // {
335 | // currentStep.addClass("error");
336 | // }
337 | // }
338 |
339 | /**
340 | * Gets or creates if not exist an unique event namespace for the given wizard instance.
341 | *
342 | * @static
343 | * @private
344 | * @method getEventNamespace
345 | * @param wizard {Object} A jQuery wizard object
346 | * @return {String} Returns the unique event namespace for the given wizard
347 | */
348 | function getEventNamespace(wizard)
349 | {
350 | var eventNamespace = wizard.data("eventNamespace");
351 |
352 | if (eventNamespace == null)
353 | {
354 | eventNamespace = "." + getUniqueId(wizard);
355 | wizard.data("eventNamespace", eventNamespace);
356 | }
357 |
358 | return eventNamespace;
359 | }
360 |
361 | function getStepAnchor(wizard, index)
362 | {
363 | var uniqueId = getUniqueId(wizard);
364 |
365 | return wizard.find("#" + uniqueId + _tabSuffix + index);
366 | }
367 |
368 | function getStepPanel(wizard, index)
369 | {
370 | var uniqueId = getUniqueId(wizard);
371 |
372 | return wizard.find("#" + uniqueId + _tabpanelSuffix + index);
373 | }
374 |
375 | function getStepTitle(wizard, index)
376 | {
377 | var uniqueId = getUniqueId(wizard);
378 |
379 | return wizard.find("#" + uniqueId + _titleSuffix + index);
380 | }
381 |
382 | function getOptions(wizard)
383 | {
384 | return wizard.data("options");
385 | }
386 |
387 | function getState(wizard)
388 | {
389 | return wizard.data("state");
390 | }
391 |
392 | function getSteps(wizard)
393 | {
394 | return wizard.data("steps");
395 | }
396 |
397 | /**
398 | * Gets a specific step object by index.
399 | *
400 | * @static
401 | * @private
402 | * @method getStep
403 | * @param index {Integer} An integer that belongs to the position of a step
404 | * @return {Object} A specific step object
405 | **/
406 | function getStep(wizard, index)
407 | {
408 | var steps = getSteps(wizard);
409 |
410 | if (index < 0 || index >= steps.length)
411 | {
412 | throwError(_indexOutOfRangeErrorMessage);
413 | }
414 |
415 | return steps[index];
416 | }
417 |
418 | /**
419 | * Gets or creates if not exist an unique id from the given wizard instance.
420 | *
421 | * @static
422 | * @private
423 | * @method getUniqueId
424 | * @param wizard {Object} A jQuery wizard object
425 | * @return {String} Returns the unique id for the given wizard
426 | */
427 | function getUniqueId(wizard)
428 | {
429 | var uniqueId = wizard.data("uid");
430 |
431 | if (uniqueId == null)
432 | {
433 | uniqueId = wizard._id();
434 | if (uniqueId == null)
435 | {
436 | uniqueId = "steps-uid-".concat(_uniqueId);
437 | wizard._id(uniqueId);
438 | }
439 |
440 | _uniqueId++;
441 | wizard.data("uid", uniqueId);
442 | }
443 |
444 | return uniqueId;
445 | }
446 |
447 | /**
448 | * Gets a valid enum value by checking a specific enum key or value.
449 | *
450 | * @static
451 | * @private
452 | * @method getValidEnumValue
453 | * @param enumType {Object} Type of enum
454 | * @param keyOrValue {Object} Key as `String` or value as `Integer` to check for
455 | */
456 | function getValidEnumValue(enumType, keyOrValue)
457 | {
458 | validateArgument("enumType", enumType);
459 | validateArgument("keyOrValue", keyOrValue);
460 |
461 | // Is key
462 | if (typeof keyOrValue === "string")
463 | {
464 | var value = enumType[keyOrValue];
465 | if (value === undefined)
466 | {
467 | throwError("The enum key '{0}' does not exist.", keyOrValue);
468 | }
469 |
470 | return value;
471 | }
472 | // Is value
473 | else if (typeof keyOrValue === "number")
474 | {
475 | for (var key in enumType)
476 | {
477 | if (enumType[key] === keyOrValue)
478 | {
479 | return keyOrValue;
480 | }
481 | }
482 |
483 | throwError("Invalid enum value '{0}'.", keyOrValue);
484 | }
485 | // Type is not supported
486 | else
487 | {
488 | throwError("Invalid key or value type.");
489 | }
490 | }
491 |
492 | /**
493 | * Routes to the next step.
494 | *
495 | * @static
496 | * @private
497 | * @method goToNextStep
498 | * @param wizard {Object} The jQuery wizard object
499 | * @param options {Object} Settings of the current wizard
500 | * @param state {Object} The state container of the current wizard
501 | * @return {Boolean} Indicates whether the action executed
502 | **/
503 | function goToNextStep(wizard, options, state)
504 | {
505 | return paginationClick(wizard, options, state, increaseCurrentIndexBy(state, 1));
506 | }
507 |
508 | /**
509 | * Routes to the previous step.
510 | *
511 | * @static
512 | * @private
513 | * @method goToPreviousStep
514 | * @param wizard {Object} The jQuery wizard object
515 | * @param options {Object} Settings of the current wizard
516 | * @param state {Object} The state container of the current wizard
517 | * @return {Boolean} Indicates whether the action executed
518 | **/
519 | function goToPreviousStep(wizard, options, state)
520 | {
521 | return paginationClick(wizard, options, state, decreaseCurrentIndexBy(state, 1));
522 | }
523 |
524 | /**
525 | * Routes to a specific step by a given index.
526 | *
527 | * @static
528 | * @private
529 | * @method goToStep
530 | * @param wizard {Object} The jQuery wizard object
531 | * @param options {Object} Settings of the current wizard
532 | * @param state {Object} The state container of the current wizard
533 | * @param index {Integer} The position (zero-based) to route to
534 | * @return {Boolean} Indicates whether the action succeeded or failed
535 | **/
536 | function goToStep(wizard, options, state, index)
537 | {
538 | if (index < 0 || index >= state.stepCount)
539 | {
540 | throwError(_indexOutOfRangeErrorMessage);
541 | }
542 |
543 | if (options.forceMoveForward && index < state.currentIndex)
544 | {
545 | return;
546 | }
547 |
548 | var oldIndex = state.currentIndex;
549 | if (wizard.triggerHandler("stepChanging", [state.currentIndex, index]))
550 | {
551 | // Save new state
552 | state.currentIndex = index;
553 | saveCurrentStateToCookie(wizard, options, state);
554 |
555 | // Change visualisation
556 | refreshStepNavigation(wizard, options, state, oldIndex);
557 | refreshPagination(wizard, options, state);
558 | loadAsyncContent(wizard, options, state);
559 | startTransitionEffect(wizard, options, state, index, oldIndex, function()
560 | {
561 | wizard.triggerHandler("stepChanged", [index, oldIndex]);
562 | });
563 | }
564 | else
565 | {
566 | wizard.find(".steps li").eq(oldIndex).addClass("error");
567 | }
568 |
569 | return true;
570 | }
571 |
572 | function increaseCurrentIndexBy(state, increaseBy)
573 | {
574 | return state.currentIndex + increaseBy;
575 | }
576 |
577 | /**
578 | * Initializes the component.
579 | *
580 | * @static
581 | * @private
582 | * @method initialize
583 | * @param options {Object} The component settings
584 | **/
585 | function initialize(options)
586 | {
587 | /*jshint -W040 */
588 | var opts = $.extend(true, {}, defaults, options);
589 |
590 | return this.each(function ()
591 | {
592 | var wizard = $(this);
593 | var state = {
594 | currentIndex: opts.startIndex,
595 | currentStep: null,
596 | stepCount: 0,
597 | transitionElement: null
598 | };
599 |
600 | // Create data container
601 | wizard.data("options", opts);
602 | wizard.data("state", state);
603 | wizard.data("steps", []);
604 |
605 | analyzeData(wizard, opts, state);
606 | render(wizard, opts, state);
607 | registerEvents(wizard, opts);
608 |
609 | // Trigger focus
610 | if (opts.autoFocus && _uniqueId === 0)
611 | {
612 | getStepAnchor(wizard, opts.startIndex).focus();
613 | }
614 |
615 | wizard.triggerHandler("init", [opts.startIndex]);
616 | });
617 | }
618 |
619 | /**
620 | * Inserts a new step to a specific position.
621 | *
622 | * @static
623 | * @private
624 | * @method insertStep
625 | * @param wizard {Object} The jQuery wizard object
626 | * @param options {Object} Settings of the current wizard
627 | * @param state {Object} The state container of the current wizard
628 | * @param index {Integer} The position (zero-based) to add
629 | * @param step {Object} The step object to add
630 | * @example
631 | * $("#wizard").steps().insert(0, {
632 | * title: "Title",
633 | * content: "", // optional
634 | * contentMode: "async", // optional
635 | * contentUrl: "/Content/Step/1" // optional
636 | * });
637 | * @chainable
638 | **/
639 | function insertStep(wizard, options, state, index, step)
640 | {
641 | if (index < 0 || index > state.stepCount)
642 | {
643 | throwError(_indexOutOfRangeErrorMessage);
644 | }
645 |
646 | // TODO: Validate step object
647 |
648 | // Change data
649 | step = $.extend({}, stepModel, step);
650 | insertStepToCache(wizard, index, step);
651 | if (state.currentIndex !== state.stepCount && state.currentIndex >= index)
652 | {
653 | state.currentIndex++;
654 | saveCurrentStateToCookie(wizard, options, state);
655 | }
656 | state.stepCount++;
657 |
658 | var contentContainer = wizard.find(".content"),
659 | header = $("<{0}>{1}{0}>".format(options.headerTag, step.title)),
660 | body = $("<{0}>{0}>".format(options.bodyTag));
661 |
662 | if (step.contentMode == null || step.contentMode === contentMode.html)
663 | {
664 | body.html(step.content);
665 | }
666 |
667 | if (index === 0)
668 | {
669 | contentContainer.prepend(body).prepend(header);
670 | }
671 | else
672 | {
673 | getStepPanel(wizard, (index - 1)).after(body).after(header);
674 | }
675 |
676 | renderBody(wizard, state, body, index);
677 | renderTitle(wizard, options, state, header, index);
678 | refreshSteps(wizard, options, state, index);
679 | if (index === state.currentIndex)
680 | {
681 | refreshStepNavigation(wizard, options, state);
682 | }
683 | refreshPagination(wizard, options, state);
684 |
685 | return wizard;
686 | }
687 |
688 | /**
689 | * Inserts a step object to the cache at a specific position.
690 | *
691 | * @static
692 | * @private
693 | * @method insertStepToCache
694 | * @param wizard {Object} A jQuery wizard object
695 | * @param index {Integer} The position (zero-based) to add
696 | * @param step {Object} The step object to add
697 | **/
698 | function insertStepToCache(wizard, index, step)
699 | {
700 | getSteps(wizard).splice(index, 0, step);
701 | }
702 |
703 | /**
704 | * Handles the keyup DOM event for pagination.
705 | *
706 | * @static
707 | * @private
708 | * @event keyup
709 | * @param event {Object} An event object
710 | */
711 | function keyUpHandler(event)
712 | {
713 | var wizard = $(this),
714 | options = getOptions(wizard),
715 | state = getState(wizard);
716 |
717 | if (options.suppressPaginationOnFocus && wizard.find(":focus").is(":input"))
718 | {
719 | event.preventDefault();
720 | return false;
721 | }
722 |
723 | var keyCodes = { left: 37, right: 39 };
724 | if (event.keyCode === keyCodes.left)
725 | {
726 | event.preventDefault();
727 | goToPreviousStep(wizard, options, state);
728 | }
729 | else if (event.keyCode === keyCodes.right)
730 | {
731 | event.preventDefault();
732 | goToNextStep(wizard, options, state);
733 | }
734 | }
735 |
736 | /**
737 | * Loads and includes async content.
738 | *
739 | * @static
740 | * @private
741 | * @method loadAsyncContent
742 | * @param wizard {Object} A jQuery wizard object
743 | * @param options {Object} Settings of the current wizard
744 | * @param state {Object} The state container of the current wizard
745 | */
746 | function loadAsyncContent(wizard, options, state)
747 | {
748 | if (state.stepCount > 0)
749 | {
750 | var currentIndex = state.currentIndex,
751 | currentStep = getStep(wizard, currentIndex);
752 |
753 | if (!options.enableContentCache || !currentStep.contentLoaded)
754 | {
755 | switch (getValidEnumValue(contentMode, currentStep.contentMode))
756 | {
757 | case contentMode.iframe:
758 | wizard.find(".content > .body").eq(state.currentIndex).empty()
759 | .html("")
760 | .data("loaded", "1");
761 | break;
762 |
763 | case contentMode.async:
764 | var currentStepContent = getStepPanel(wizard, currentIndex)._aria("busy", "true")
765 | .empty().append(renderTemplate(options.loadingTemplate, { text: options.labels.loading }));
766 |
767 | $.ajax({ url: currentStep.contentUrl, cache: false }).done(function (data)
768 | {
769 | currentStepContent.empty().html(data)._aria("busy", "false").data("loaded", "1");
770 | wizard.triggerHandler("contentLoaded", [currentIndex]);
771 | });
772 | break;
773 | }
774 | }
775 | }
776 | }
777 |
778 | /**
779 | * Fires the action next or previous click event.
780 | *
781 | * @static
782 | * @private
783 | * @method paginationClick
784 | * @param wizard {Object} The jQuery wizard object
785 | * @param options {Object} Settings of the current wizard
786 | * @param state {Object} The state container of the current wizard
787 | * @param index {Integer} The position (zero-based) to route to
788 | * @return {Boolean} Indicates whether the event fired successfully or not
789 | **/
790 | function paginationClick(wizard, options, state, index)
791 | {
792 | var oldIndex = state.currentIndex;
793 |
794 | if (index >= 0 && index < state.stepCount && !(options.forceMoveForward && index < state.currentIndex))
795 | {
796 | var anchor = getStepAnchor(wizard, index),
797 | parent = anchor.parent(),
798 | isDisabled = parent.hasClass("disabled");
799 |
800 | // Enable the step to make the anchor clickable!
801 | parent._enableAria();
802 | anchor.click();
803 |
804 | // An error occured
805 | if (oldIndex === state.currentIndex && isDisabled)
806 | {
807 | // Disable the step again if current index has not changed; prevents click action.
808 | parent._enableAria(false);
809 | return false;
810 | }
811 |
812 | return true;
813 | }
814 |
815 | return false;
816 | }
817 |
818 | /**
819 | * Fires when a pagination click happens.
820 | *
821 | * @static
822 | * @private
823 | * @event click
824 | * @param event {Object} An event object
825 | */
826 | function paginationClickHandler(event) {
827 | event.preventDefault();
828 |
829 | var anchor = $(this),
830 | wizard = anchor.parent().parent().parent().parent(),
831 | options = getOptions(wizard),
832 | state = getState(wizard),
833 | href = anchor.attr("href");
834 |
835 | switch (href.substring(href.lastIndexOf("#") + 1)) {
836 | case "cancel":
837 | cancel(wizard);
838 | break;
839 |
840 | case "finish":
841 | // Trigger the "finished" event for #wizard
842 | wizard.trigger("finished", state);
843 | break;
844 |
845 | case "next":
846 | goToNextStep(wizard, options, state);
847 | break;
848 |
849 | case "previous":
850 | goToPreviousStep(wizard, options, state);
851 | break;
852 | }
853 | }
854 |
855 | /**
856 | * Refreshs the visualization state for the entire pagination.
857 | *
858 | * @static
859 | * @private
860 | * @method refreshPagination
861 | * @param wizard {Object} A jQuery wizard object
862 | * @param options {Object} Settings of the current wizard
863 | * @param state {Object} The state container of the current wizard
864 | */
865 | function refreshPagination(wizard, options, state)
866 | {
867 | if (options.enablePagination)
868 | {
869 | var finish = wizard.find(".actions a[href$='#finish']").parent(),
870 | next = wizard.find(".actions a[href$='#next']").parent();
871 |
872 | if (!options.forceMoveForward)
873 | {
874 | var previous = wizard.find(".actions a[href$='#previous']").parent();
875 | previous._enableAria(state.currentIndex > 0);
876 | }
877 |
878 | if (options.enableFinishButton && options.showFinishButtonAlways)
879 | {
880 | finish._enableAria(state.stepCount > 0);
881 | next._enableAria(state.stepCount > 1 && state.stepCount > (state.currentIndex + 1));
882 | }
883 | else
884 | {
885 | finish._showAria(options.enableFinishButton && state.stepCount === (state.currentIndex + 1));
886 | next._showAria(state.stepCount === 0 || state.stepCount > (state.currentIndex + 1)).
887 | _enableAria(state.stepCount > (state.currentIndex + 1) || !options.enableFinishButton);
888 | }
889 | }
890 | }
891 |
892 | /**
893 | * Refreshs the visualization state for the step navigation (tabs).
894 | *
895 | * @static
896 | * @private
897 | * @method refreshStepNavigation
898 | * @param wizard {Object} A jQuery wizard object
899 | * @param options {Object} Settings of the current wizard
900 | * @param state {Object} The state container of the current wizard
901 | * @param [oldIndex] {Integer} The index of the prior step
902 | */
903 | function refreshStepNavigation(wizard, options, state, oldIndex)
904 | {
905 | var currentOrNewStepAnchor = getStepAnchor(wizard, state.currentIndex),
906 | currentInfo = $("" + options.labels.current + " "),
907 | stepTitles = wizard.find(".content > .title");
908 |
909 | if (oldIndex != null)
910 | {
911 | var oldStepAnchor = getStepAnchor(wizard, oldIndex);
912 | oldStepAnchor.parent().addClass("done").removeClass("error")._selectAria(false);
913 | stepTitles.eq(oldIndex).removeClass("current").next(".body").removeClass("current");
914 | currentInfo = oldStepAnchor.find(".current-info");
915 | currentOrNewStepAnchor.focus();
916 | }
917 |
918 | currentOrNewStepAnchor.prepend(currentInfo).parent()._selectAria().removeClass("done")._enableAria();
919 | stepTitles.eq(state.currentIndex).addClass("current").next(".body").addClass("current");
920 | }
921 |
922 | /**
923 | * Refreshes step buttons and their related titles beyond a certain position.
924 | *
925 | * @static
926 | * @private
927 | * @method refreshSteps
928 | * @param wizard {Object} A jQuery wizard object
929 | * @param options {Object} Settings of the current wizard
930 | * @param state {Object} The state container of the current wizard
931 | * @param index {Integer} The start point for refreshing ids
932 | */
933 | function refreshSteps(wizard, options, state, index)
934 | {
935 | var uniqueId = getUniqueId(wizard);
936 |
937 | for (var i = index; i < state.stepCount; i++)
938 | {
939 | var uniqueStepId = uniqueId + _tabSuffix + i,
940 | uniqueBodyId = uniqueId + _tabpanelSuffix + i,
941 | uniqueHeaderId = uniqueId + _titleSuffix + i,
942 | title = wizard.find(".title").eq(i)._id(uniqueHeaderId);
943 |
944 | wizard.find(".steps a").eq(i)._id(uniqueStepId)
945 | ._aria("controls", uniqueBodyId).attr("href", "#" + uniqueHeaderId)
946 | .html(renderTemplate(options.titleTemplate, { index: i + 1, title: title.html() }));
947 | wizard.find(".body").eq(i)._id(uniqueBodyId)
948 | ._aria("labelledby", uniqueHeaderId);
949 | }
950 | }
951 |
952 | function registerEvents(wizard, options)
953 | {
954 | var eventNamespace = getEventNamespace(wizard);
955 |
956 | wizard.bind("canceled" + eventNamespace, options.onCanceled);
957 | wizard.bind("contentLoaded" + eventNamespace, options.onContentLoaded);
958 | wizard.bind("finishing" + eventNamespace, options.onFinishing);
959 | wizard.bind("finished" + eventNamespace, options.onFinished);
960 | wizard.bind("init" + eventNamespace, options.onInit);
961 | wizard.bind("stepChanging" + eventNamespace, options.onStepChanging);
962 | wizard.bind("stepChanged" + eventNamespace, options.onStepChanged);
963 |
964 | if (options.enableKeyNavigation)
965 | {
966 | wizard.bind("keyup" + eventNamespace, keyUpHandler);
967 | }
968 |
969 | wizard.find(".actions a").bind("click" + eventNamespace, paginationClickHandler);
970 | }
971 |
972 | /**
973 | * Removes a specific step by an given index.
974 | *
975 | * @static
976 | * @private
977 | * @method removeStep
978 | * @param wizard {Object} A jQuery wizard object
979 | * @param options {Object} Settings of the current wizard
980 | * @param state {Object} The state container of the current wizard
981 | * @param index {Integer} The position (zero-based) of the step to remove
982 | * @return Indecates whether the item is removed.
983 | **/
984 | function removeStep(wizard, options, state, index)
985 | {
986 | // Index out of range and try deleting current item will return false.
987 | if (index < 0 || index >= state.stepCount || state.currentIndex === index)
988 | {
989 | return false;
990 | }
991 |
992 | // Change data
993 | removeStepFromCache(wizard, index);
994 | if (state.currentIndex > index)
995 | {
996 | state.currentIndex--;
997 | saveCurrentStateToCookie(wizard, options, state);
998 | }
999 | state.stepCount--;
1000 |
1001 | getStepTitle(wizard, index).remove();
1002 | getStepPanel(wizard, index).remove();
1003 | getStepAnchor(wizard, index).parent().remove();
1004 |
1005 | // Set the "first" class to the new first step button
1006 | if (index === 0)
1007 | {
1008 | wizard.find(".steps li").first().addClass("first");
1009 | }
1010 |
1011 | // Set the "last" class to the new last step button
1012 | if (index === state.stepCount)
1013 | {
1014 | wizard.find(".steps li").eq(index).addClass("last");
1015 | }
1016 |
1017 | refreshSteps(wizard, options, state, index);
1018 | refreshPagination(wizard, options, state);
1019 |
1020 | return true;
1021 | }
1022 |
1023 | function removeStepFromCache(wizard, index)
1024 | {
1025 | getSteps(wizard).splice(index, 1);
1026 | }
1027 |
1028 | /**
1029 | * Transforms the base html structure to a more sensible html structure.
1030 | *
1031 | * @static
1032 | * @private
1033 | * @method render
1034 | * @param wizard {Object} A jQuery wizard object
1035 | * @param options {Object} Settings of the current wizard
1036 | * @param state {Object} The state container of the current wizard
1037 | **/
1038 | function render(wizard, options, state)
1039 | {
1040 | // Create a content wrapper and copy HTML from the intial wizard structure
1041 | var wrapperTemplate = "<{0} class=\"{1}\">{2}{0}>",
1042 | orientation = getValidEnumValue(stepsOrientation, options.stepsOrientation),
1043 | verticalCssClass = (orientation === stepsOrientation.vertical) ? " vertical" : "",
1044 | contentWrapper = $(wrapperTemplate.format(options.contentContainerTag, "content " + options.clearFixCssClass, wizard.html())),
1045 | stepsWrapper = $(wrapperTemplate.format(options.stepsContainerTag, "steps " + options.clearFixCssClass, "
")),
1046 | stepTitles = contentWrapper.children(options.headerTag),
1047 | stepContents = contentWrapper.children(options.bodyTag);
1048 |
1049 | // Transform the wizard wrapper and remove the inner HTML
1050 | wizard.attr("role", "application").empty().append(stepsWrapper).append(contentWrapper)
1051 | .addClass(options.cssClass + " " + options.clearFixCssClass + verticalCssClass);
1052 |
1053 | // Add WIA-ARIA support
1054 | stepContents.each(function (index)
1055 | {
1056 | renderBody(wizard, state, $(this), index);
1057 | });
1058 |
1059 | stepTitles.each(function (index)
1060 | {
1061 | renderTitle(wizard, options, state, $(this), index);
1062 | });
1063 |
1064 | refreshStepNavigation(wizard, options, state);
1065 | renderPagination(wizard, options, state);
1066 | }
1067 |
1068 | /**
1069 | * Transforms the body to a proper tabpanel.
1070 | *
1071 | * @static
1072 | * @private
1073 | * @method renderBody
1074 | * @param wizard {Object} A jQuery wizard object
1075 | * @param body {Object} A jQuery body object
1076 | * @param index {Integer} The position of the body
1077 | */
1078 | function renderBody(wizard, state, body, index)
1079 | {
1080 | var uniqueId = getUniqueId(wizard),
1081 | uniqueBodyId = uniqueId + _tabpanelSuffix + index,
1082 | uniqueHeaderId = uniqueId + _titleSuffix + index;
1083 |
1084 | body._id(uniqueBodyId).attr("role", "tabpanel")._aria("labelledby", uniqueHeaderId)
1085 | .addClass("body")._showAria(state.currentIndex === index);
1086 | }
1087 |
1088 | /**
1089 | * Renders a pagination if enabled.
1090 | *
1091 | * @static
1092 | * @private
1093 | * @method renderPagination
1094 | * @param wizard {Object} A jQuery wizard object
1095 | * @param options {Object} Settings of the current wizard
1096 | * @param state {Object} The state container of the current wizard
1097 | */
1098 | function renderPagination(wizard, options, state)
1099 | {
1100 | if (options.enablePagination)
1101 | {
1102 | var pagination = "<{0} class=\"actions {1}\">