mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Installed FontAwesome 4. Modified form and list generation to force icon selection through a single method so that icons, icon sizes and button colors are all consistent. Everything seems to be working now with the exception of the status bubbles on list pages. Will need to modify ansible-ui.less anc change the unicode strings to new FontAwesome values.
This commit is contained in:
parent
e16e5a0dfa
commit
d02d2ebf15
2
Makefile
2
Makefile
@ -94,7 +94,7 @@ dbchange:
|
||||
|
||||
# access database shell, asks for password
|
||||
dbshell:
|
||||
sudo -u postgres psql -d awx
|
||||
sudo -u postgres psql -d awx-dev
|
||||
|
||||
# Run the built-in development webserver (by default on http://localhost:8013).
|
||||
runserver:
|
||||
|
||||
1393
awx/ui/static/css/font-awesome.css
vendored
1393
awx/ui/static/css/font-awesome.css
vendored
File diff suppressed because it is too large
Load Diff
406
awx/ui/static/css/font-awesome.min.css
vendored
406
awx/ui/static/css/font-awesome.min.css
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
awx/ui/static/fonts/FontAwesome.otf
Executable file
BIN
awx/ui/static/fonts/FontAwesome.otf
Executable file
Binary file not shown.
BIN
awx/ui/static/fonts/fontawesome-webfont.eot
Executable file
BIN
awx/ui/static/fonts/fontawesome-webfont.eot
Executable file
Binary file not shown.
@ -280,8 +280,8 @@
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320 q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86 t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218 q0 -87 -27 -168q136 -160 136 -398z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320 q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68 v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z " />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M896 608v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224h224q14 0 23 -9t9 -23zM1024 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 -28 t-28 -68v-704q0 -40 28 -68t68 -28h704q40 0 68 28t28 68zM1152 928v-704q0 -92 -65.5 -158t-158.5 -66h-704q-93 0 -158.5 66t-65.5 158v704q0 93 65.5 158.5t158.5 65.5h704q93 0 158.5 -65.5t65.5 -158.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M928 1152q93 0 158.5 -65.5t65.5 -158.5v-704q0 -92 -65.5 -158t-158.5 -66h-704q-93 0 -158.5 66t-65.5 158v704q0 93 65.5 158.5t158.5 65.5h704zM1024 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 -28t-28 -68v-704q0 -40 28 -68t68 -28h704q40 0 68 28t28 68z M864 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5 t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204 t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
@ -310,7 +310,7 @@
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800 q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113 q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1 q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1708 881l-188 -881h-304l181 849q4 21 1 43q-4 20 -16 35q-10 14 -28 24q-18 9 -40 9h-197l-205 -960h-303l204 960h-304l-205 -960h-304l272 1280h1139q157 0 245 -118q86 -116 52 -281z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M1745 763l-164 -763h-334l178 832q13 56 -15 88q-27 33 -83 33h-169l-204 -953h-334l204 953h-286l-204 -953h-334l204 953l-153 327h1276q101 0 189.5 -40.5t147.5 -113.5q60 -73 81 -168.5t0 -194.5z" />
|
||||
<glyph unicode="" d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
@ -342,7 +342,7 @@
|
||||
<glyph unicode="" horiz-adv-x="1024" d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43 t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5 t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50 t53 -63.5t31.5 -76.5t13 -94z" />
|
||||
<glyph unicode="" horiz-adv-x="898" d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102 q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1027" d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61 l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1664 352v-32q0 -132 -94 -226t-226 -94h-128q-132 0 -226 94t-94 226v480h-224q-2 -102 -14.5 -190.5t-30.5 -156t-48.5 -126.5t-57 -99.5t-67.5 -77.5t-69.5 -58.5t-74 -44t-69 -32t-65.5 -25.5q-4 -2 -32 -13q-8 -2 -12 -2q-22 0 -30 20l-71 178q-5 13 0 25t17 17 q7 3 20 7.5t18 6.5q31 12 46.5 18.5t44.5 20t45.5 26t42 32.5t40.5 42.5t34.5 53.5t30.5 68.5t22.5 83.5t17 103t6.5 123h-256q-14 0 -23 9t-9 23v160q0 14 9 23t23 9h1216q14 0 23 -9t9 -23v-160q0 -14 -9 -23t-23 -9h-224v-512q0 -26 19 -45t45 -19h128q26 0 45 19t19 45 v64q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1280 1376v-160q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v160q0 14 9 23t23 9h960q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1043 971q0 100 -65 162t-171 62h-320v-448h320q106 0 171 62t65 162zM1280 971q0 -193 -126.5 -315t-326.5 -122h-340v-118h505q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-505v-192q0 -14 -9.5 -23t-22.5 -9h-167q-14 0 -23 9t-9 23v192h-224q-14 0 -23 9t-9 23v128 q0 14 9 23t23 9h224v118h-224q-14 0 -23 9t-9 23v149q0 13 9 22.5t23 9.5h224v629q0 14 9 23t23 9h539q200 0 326.5 -122t126.5 -315z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23 t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28 q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164 l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30 t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1280 768v-800q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h544v-544q0 -40 28 -68t68 -28h544zM1277 896h-509v509q82 -15 132 -65l312 -312q50 -50 65 -132z" />
|
||||
@ -390,10 +390,25 @@
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207 q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19 t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12 q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422 q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178 q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1920" d="M805 163q-122 -67 -261 -67q-141 0 -261 67q98 61 167 149t94 191q25 -103 94 -191t167 -149zM453 1176v-344q0 -179 -89.5 -326t-234.5 -217q-129 152 -129 351q0 200 129.5 352t323.5 184zM958 991q-128 -152 -128 -351q0 -201 128 -351q-145 70 -234.5 218t-89.5 328 v341q196 -33 324 -185zM1638 163q-122 -67 -261 -67q-141 0 -261 67q98 61 167 149t94 191q25 -103 94 -191t167 -149zM1286 1176v-344q0 -179 -91 -326t-237 -217v0q133 154 133 351q0 195 -133 351q129 151 328 185zM1920 640q0 -201 -129 -351q-145 70 -234.5 218 t-89.5 328v341q194 -32 323.5 -184t129.5 -352z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" d="M1133 -34q-171 -94 -368 -94q-196 0 -367 94q138 87 235.5 211t131.5 268q35 -144 132.5 -268t235.5 -211zM638 1394v-485q0 -252 -126.5 -459.5t-330.5 -306.5q-181 215 -181 495q0 187 83.5 349.5t229.5 269.5t325 137zM1536 638q0 -280 -181 -495 q-204 99 -330.5 306.5t-126.5 459.5v485q179 -30 325 -137t229.5 -269.5t83.5 -349.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1402 433q-32 -80 -76 -138t-91 -88.5t-99 -46.5t-101.5 -14.5t-96.5 8.5t-86.5 22t-69.5 27.5t-46 22.5l-17 10q-113 -228 -289.5 -359.5t-384.5 -132.5q-19 0 -32 13t-13 32t13 31.5t32 12.5q173 1 322.5 107.5t251.5 294.5q-36 -14 -72 -23t-83 -13t-91 2.5t-93 28.5 t-92 59t-84.5 100t-74.5 146q114 47 214 57t167.5 -7.5t124.5 -56.5t88.5 -77t56.5 -82q53 131 79 291q-7 -1 -18 -2.5t-46.5 -2.5t-69.5 0.5t-81.5 10t-88.5 23t-84 42.5t-75 65t-54.5 94.5t-28.5 127.5q70 28 133.5 36.5t112.5 -1t92 -30t73.5 -50t56 -61t42 -63t27.5 -56 t16 -39.5l4 -16q12 122 12 195q-8 6 -21.5 16t-49 44.5t-63.5 71.5t-54 93t-33 112.5t12 127t70 138.5q73 -25 127.5 -61.5t84.5 -76.5t48 -85t20.5 -89t-0.5 -85.5t-13 -76.5t-19 -62t-17 -42l-7 -15q1 -5 1 -50.5t-1 -71.5q3 7 10 18.5t30.5 43t50.5 58t71 55.5t91.5 44.5 t112 14.5t132.5 -24q-2 -78 -21.5 -141.5t-50 -104.5t-69.5 -71.5t-81.5 -45.5t-84.5 -24t-80 -9.5t-67.5 1t-46.5 4.5l-17 3q-23 -147 -73 -283q6 7 18 18.5t49.5 41t77.5 52.5t99.5 42t117.5 20t129 -23.5t137 -77.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1280" d="M1259 283v-66q0 -85 -57.5 -144.5t-138.5 -59.5h-57l-260 -269v269h-529q-81 0 -138.5 59.5t-57.5 144.5v66h1238zM1259 609v-255h-1238v255h1238zM1259 937v-255h-1238v255h1238zM1259 1077v-67h-1238v67q0 84 57.5 143.5t138.5 59.5h846q81 0 138.5 -59.5t57.5 -143.5z " />
|
||||
<glyph unicode="" d="M1152 640q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1152 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-192q0 -14 -9 -23t-23 -9q-12 0 -24 10l-319 319q-9 9 -9 23t9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h352q13 0 22.5 -9.5t9.5 -22.5zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" d="M1024 960v-640q0 -26 -19 -45t-45 -19q-20 0 -37 12l-448 320q-27 19 -27 52t27 52l448 320q17 12 37 12q26 0 45 -19t19 -45zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5 t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1664" d="M1023 349l102 -204q-58 -179 -210 -290t-339 -111q-156 0 -288.5 77.5t-210 210t-77.5 288.5q0 181 104.5 330t274.5 211l17 -131q-122 -54 -195 -165.5t-73 -244.5q0 -185 131.5 -316.5t316.5 -131.5q126 0 232.5 65t165 175.5t49.5 236.5zM1571 249l58 -114l-256 -128 q-13 -7 -29 -7q-40 0 -57 35l-239 477h-472q-24 0 -42.5 16.5t-21.5 40.5l-96 779q-2 16 6 42q14 51 57 82.5t97 31.5q66 0 113 -47t47 -113q0 -69 -52 -117.5t-120 -41.5l37 -289h423v-128h-407l16 -128h455q40 0 57 -35l228 -455z" />
|
||||
<glyph unicode="" d="M1254 899q16 85 -21 132q-52 65 -187 45q-17 -3 -41 -12.5t-57.5 -30.5t-64.5 -48.5t-59.5 -70t-44.5 -91.5q80 7 113.5 -16t26.5 -99q-5 -52 -52 -143q-43 -78 -71 -99q-44 -32 -87 14q-23 24 -37.5 64.5t-19 73t-10 84t-8.5 71.5q-23 129 -34 164q-12 37 -35.5 69 t-50.5 40q-57 16 -127 -25q-54 -32 -136.5 -106t-122.5 -102v-7q16 -8 25.5 -26t21.5 -20q21 -3 54.5 8.5t58 10.5t41.5 -30q11 -18 18.5 -38.5t15 -48t12.5 -40.5q17 -46 53 -187q36 -146 57 -197q42 -99 103 -125q43 -12 85 -1.5t76 31.5q131 77 250 237 q104 139 172.5 292.5t82.5 226.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1152" d="M1152 704q0 -191 -94.5 -353t-256.5 -256.5t-353 -94.5h-160q-14 0 -23 9t-9 23v611l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v93l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v250q0 14 9 23t23 9h160 q14 0 23 -9t9 -23v-181l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-93l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-487q188 13 318 151t130 328q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
|
||||
<glyph unicode="" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-352v-352q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v352h-352q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h352v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-352h352q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832 q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
<glyph unicode="" horiz-adv-x="1792" />
|
||||
</font>
|
||||
</defs></svg>
|
||||
|
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 197 KiB |
Binary file not shown.
BIN
awx/ui/static/fonts/fontawesome-webfont.woff
Executable file
BIN
awx/ui/static/fonts/fontawesome-webfont.woff
Executable file
Binary file not shown.
@ -10,14 +10,36 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
function Home ($routeParams, $rootScope, $location, Wait, ObjectCount, JobStatus, InventorySyncStatus, SCMSyncStatus,
|
||||
ClearScope, Stream, Rest, GetBasePath, ProcessErrors) {
|
||||
function Home ($scope, $compile, $routeParams, $rootScope, $location, Wait, ObjectCount, JobStatus, InventorySyncStatus, SCMSyncStatus,
|
||||
ClearScope, Stream, Rest, GetBasePath, ProcessErrors, Button) {
|
||||
|
||||
ClearScope('home'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||
//scope.
|
||||
|
||||
var element = angular.element(document.getElementById('htmlTemplate'));
|
||||
var scope = element.scope();
|
||||
//var element = angular.element(document.getElementById('htmlTemplate'));
|
||||
//var scope = element.scope();
|
||||
|
||||
// Add buttons to the top of the Home page. We're using lib/ansible/generator_helpers.js-> Buttons()
|
||||
// to build buttons dynamically and insure all styling and icons match the rest of the application.
|
||||
var buttons = {
|
||||
refresh: {
|
||||
mode: 'all',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refresh()"
|
||||
},
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
};
|
||||
var html = Button({ btn: buttons.refresh, action: 'refresh', toolbar: true });
|
||||
html += Button({ btn: buttons.stream, action: 'stream', toolbar: true });
|
||||
var e = angular.element(document.getElementById('home-list-actions'));
|
||||
e.html(html);
|
||||
$compile(e)($scope);
|
||||
|
||||
var waitCount = 4;
|
||||
var loadedCount = 0;
|
||||
|
||||
@ -26,10 +48,10 @@ function Home ($routeParams, $rootScope, $location, Wait, ObjectCount, JobStatus
|
||||
Wait('start');
|
||||
}
|
||||
|
||||
if (scope.removeWidgetLoaded) {
|
||||
scope.removeWidgetLoaded();
|
||||
if ($scope.removeWidgetLoaded) {
|
||||
$scope.removeWidgetLoaded();
|
||||
}
|
||||
scope.removeWidgetLoaded = scope.$on('WidgetLoaded', function() {
|
||||
$scope.removeWidgetLoaded = $scope.$on('WidgetLoaded', function() {
|
||||
// Once all the widgets report back 'loaded', turn off Wait widget
|
||||
loadedCount++;
|
||||
if ( loadedCount == waitCount ) {
|
||||
@ -37,39 +59,39 @@ function Home ($routeParams, $rootScope, $location, Wait, ObjectCount, JobStatus
|
||||
}
|
||||
});
|
||||
|
||||
if (scope.removeDashboardReady) {
|
||||
scope.removeDashboardReady();
|
||||
if ($scope.removeDashboardReady) {
|
||||
$scope.removeDashboardReady();
|
||||
}
|
||||
scope.removeDashboardReady = scope.$on('dashboardReady', function(e, data) {
|
||||
JobStatus({ scope: scope, target: 'container1', dashboard: data});
|
||||
InventorySyncStatus({ scope: scope, target: 'container2', dashboard: data});
|
||||
SCMSyncStatus({ scope: scope, target: 'container4', dashboard: data});
|
||||
ObjectCount({ scope: scope, target: 'container3', dashboard: data});
|
||||
$scope.removeDashboardReady = $scope.$on('dashboardReady', function(e, data) {
|
||||
JobStatus({ scope: $scope, target: 'container1', dashboard: data});
|
||||
InventorySyncStatus({ scope: $scope, target: 'container2', dashboard: data});
|
||||
SCMSyncStatus({ scope: $scope, target: 'container4', dashboard: data});
|
||||
ObjectCount({ scope: $scope, target: 'container3', dashboard: data});
|
||||
});
|
||||
|
||||
scope.showActivity = function() { Stream(); }
|
||||
$scope.showActivity = function() { Stream(); }
|
||||
|
||||
scope.refresh = function() {
|
||||
$scope.refresh = function() {
|
||||
Wait('start');
|
||||
loadedCount = 0;
|
||||
Rest.setUrl(GetBasePath('dashboard'));
|
||||
Rest.get()
|
||||
.success( function(data, status, headers, config) {
|
||||
scope.$emit('dashboardReady', data);
|
||||
$scope.$emit('dashboardReady', data);
|
||||
})
|
||||
.error ( function(data, status, headers, config) {
|
||||
Wait('stop');
|
||||
ProcessErrors(scope, data, status, null,
|
||||
ProcessErrors($scope, data, status, null,
|
||||
{ hdr: 'Error!', msg: 'Failed to get dashboard: ' + status });
|
||||
})
|
||||
}
|
||||
|
||||
scope.refresh();
|
||||
$scope.refresh();
|
||||
|
||||
}
|
||||
|
||||
Home.$inject=[ '$routeParams', '$rootScope', '$location', 'Wait', 'ObjectCount', 'JobStatus', 'InventorySyncStatus',
|
||||
'SCMSyncStatus', 'ClearScope', 'Stream', 'Rest', 'GetBasePath', 'ProcessErrors'];
|
||||
Home.$inject=['$scope', '$compile', '$routeParams', '$rootScope', '$location', 'Wait', 'ObjectCount', 'JobStatus', 'InventorySyncStatus',
|
||||
'SCMSyncStatus', 'ClearScope', 'Stream', 'Rest', 'GetBasePath', 'ProcessErrors', 'Button'];
|
||||
|
||||
|
||||
function HomeGroups ($location, $routeParams, HomeGroupList, GenerateList, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope,
|
||||
@ -90,37 +112,37 @@ function HomeGroups ($location, $routeParams, HomeGroupList, GenerateList, Proce
|
||||
}
|
||||
scope.removePostRefresh = scope.$on('PostRefresh', function() {
|
||||
var msg, update_status, last_update;
|
||||
for (var i=0; i < scope.groups.length; i++) {
|
||||
for (var i=0; i < scope.home_groups.length; i++) {
|
||||
|
||||
scope['groups'][i]['inventory_name'] = scope['groups'][i]['summary_fields']['inventory']['name'];
|
||||
scope['home_groups'][i]['inventory_name'] = scope['home_groups'][i]['summary_fields']['inventory']['name'];
|
||||
|
||||
last_update = (scope.groups[i].summary_fields.inventory_source.last_updated == null) ? null :
|
||||
FormatDate(new Date(scope.groups[i].summary_fields.inventory_source.last_updated));
|
||||
last_update = (scope.home_groups[i].summary_fields.inventory_source.last_updated == null) ? null :
|
||||
FormatDate(new Date(scope.home_groups[i].summary_fields.inventory_source.last_updated));
|
||||
|
||||
// Set values for Failed Hosts column
|
||||
scope.groups[i].failed_hosts = scope.groups[i].hosts_with_active_failures + ' / ' + scope.groups[i].total_hosts;
|
||||
scope.home_groups[i].failed_hosts = scope.home_groups[i].hosts_with_active_failures + ' / ' + scope.home_groups[i].total_hosts;
|
||||
|
||||
msg = HostsStatusMsg({
|
||||
active_failures: scope.groups[i].hosts_with_active_failures,
|
||||
total_hosts: scope.groups[i].total_hosts,
|
||||
inventory_id: scope.groups[i].inventory,
|
||||
group_id: scope.groups[i].id
|
||||
active_failures: scope.home_groups[i].hosts_with_active_failures,
|
||||
total_hosts: scope.home_groups[i].total_hosts,
|
||||
inventory_id: scope.home_groups[i].inventory,
|
||||
group_id: scope.home_groups[i].id
|
||||
});
|
||||
|
||||
update_status = UpdateStatusMsg({ status: scope.groups[i].summary_fields.inventory_source.status });
|
||||
update_status = UpdateStatusMsg({ status: scope.home_groups[i].summary_fields.inventory_source.status });
|
||||
|
||||
scope.groups[i].failed_hosts_tip = msg['tooltip'];
|
||||
scope.groups[i].failed_hosts_link = msg['url'];
|
||||
scope.groups[i].failed_hosts_class = msg['class'];
|
||||
scope.groups[i].status = update_status['status'];
|
||||
scope.groups[i].source = scope.groups[i].summary_fields.inventory_source.source;
|
||||
scope.groups[i].last_updated = last_update;
|
||||
scope.groups[i].status_badge_class = update_status['class'];
|
||||
scope.groups[i].status_badge_tooltip = update_status['tooltip'];
|
||||
scope.home_groups[i].failed_hosts_tip = msg['tooltip'];
|
||||
scope.home_groups[i].failed_hosts_link = msg['url'];
|
||||
scope.home_groups[i].failed_hosts_class = msg['class'];
|
||||
scope.home_groups[i].status = update_status['status'];
|
||||
scope.home_groups[i].source = scope.groups[i].summary_fields.inventory_source.source;
|
||||
scope.home_groups[i].last_updated = last_update;
|
||||
scope.home_groups[i].status_badge_class = update_status['class'];
|
||||
scope.home_groups[i].status_badge_tooltip = update_status['tooltip'];
|
||||
}
|
||||
});
|
||||
|
||||
SearchInit({ scope: scope, set: 'groups', list: list, url: defaultUrl });
|
||||
SearchInit({ scope: scope, set: 'home_groups', list: list, url: defaultUrl });
|
||||
PaginateInit({ scope: scope, list: list, url: defaultUrl });
|
||||
|
||||
// Process search params
|
||||
|
||||
@ -314,8 +314,9 @@ InventoriesAdd.$inject = [ '$scope', '$rootScope', '$compile', '$location', '$lo
|
||||
'OrganizationList', 'SearchInit', 'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait'];
|
||||
|
||||
|
||||
function InventoriesEdit ($rootScope, $location, $routeParams, GenerateList, ClearScope, InventoryGroups, InventoryHosts, BuildTree, Wait,
|
||||
UpdateStatusMsg, InjectHosts)
|
||||
|
||||
function InventoriesEdit ($scope, $location, $routeParams, GenerateList, ClearScope, InventoryGroups, InventoryHosts, BuildTree, Wait,
|
||||
UpdateStatusMsg, InjectHosts, HostsReload)
|
||||
{
|
||||
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||
//scope.
|
||||
@ -323,30 +324,37 @@ function InventoriesEdit ($rootScope, $location, $routeParams, GenerateList, Cle
|
||||
var generator = GenerateList;
|
||||
var list = InventoryGroups;
|
||||
var base = $location.path().replace(/^\//,'').split('/')[0];
|
||||
var scope = $rootScope.$new();
|
||||
var groupScope;
|
||||
|
||||
scope.$on('searchTreeReady', function(e, inventory_name, groups) {
|
||||
|
||||
$scope.inventory_id = $routeParams.inventory_id;
|
||||
|
||||
$scope.$on('searchTreeReady', function(e, inventory_name, groups) {
|
||||
// After the tree data loads, generate the groups list
|
||||
groupScope = generator.inject(list, { mode: 'edit', id: 'groups-container', breadCrumbs: false, searchSize: 'col-lg-5' });
|
||||
groupScope.groups = groups;
|
||||
for (var i=0; i < groupScope.groups.length; i++) {
|
||||
var stat = UpdateStatusMsg({ status: groupScope.groups[i].status });
|
||||
groupScope.groups[i].status_badge_class = stat['class'];
|
||||
groupScope.groups[i].status_badge_tooltip = stat['tooltip'];
|
||||
groupScope.groups[i].status = stat['status'];
|
||||
generator.inject(list, { mode: 'edit', id: 'groups-container', breadCrumbs: false, searchSize: 'col-lg-5' });
|
||||
$scope.groups = groups;
|
||||
$scope.inventory_name = inventory_name;
|
||||
|
||||
for (var i=0; i < $scope.groups.length; i++) {
|
||||
var stat = UpdateStatusMsg({ status: $scope.groups[i].status });
|
||||
$scope.groups[i].status_badge_class = stat['class'];
|
||||
$scope.groups[i].status_badge_tooltip = stat['tooltip'];
|
||||
$scope.groups[i].status = stat['status'];
|
||||
}
|
||||
groupScope.inventory_name = inventory_name;
|
||||
groupScope.inventory_id = $routeParams.inventory_id;
|
||||
InjectHosts({ scope: groupScope });
|
||||
|
||||
InjectHosts({ scope: $scope, inventory_id: $scope.inventory_id });
|
||||
|
||||
Wait('stop');
|
||||
});
|
||||
|
||||
BuildTree({ scope: scope, inventory_id: $routeParams.inventory_id });
|
||||
$scope.showHosts = function(group_id) {
|
||||
// Clicked on group
|
||||
console.log('here');
|
||||
HostsReload({ scope: $scope, group_id: group_id, inventory_id: $scope.inventory_id });
|
||||
}
|
||||
|
||||
BuildTree({ scope: $scope, inventory_id: $scope.inventory_id });
|
||||
}
|
||||
|
||||
InventoriesEdit.$inject = [ '$rootScope','$location', '$routeParams', 'GenerateList', 'ClearScope', 'InventoryGroups', 'InventoryHosts', 'BuildTree',
|
||||
'Wait', 'UpdateStatusMsg', 'InjectHosts'
|
||||
InventoriesEdit.$inject = [ '$scope','$location', '$routeParams', 'GenerateList', 'ClearScope', 'InventoryGroups', 'InventoryHosts', 'BuildTree',
|
||||
'Wait', 'UpdateStatusMsg', 'InjectHosts', 'HostsReload'
|
||||
];
|
||||
|
||||
|
||||
@ -17,13 +17,9 @@ angular.module('CredentialFormDefinition', [])
|
||||
|
||||
actions: {
|
||||
stream: {
|
||||
'class': "btn-primary btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
},
|
||||
|
||||
@ -18,11 +18,12 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
|
||||
function(Empty, InventoryHosts, GetBasePath, SearchInit, PaginateInit) {
|
||||
return function(params) {
|
||||
|
||||
var group_id = params.group_id;
|
||||
var scope = params.scope;
|
||||
var group_id = params.group_id;
|
||||
var inventory_id = params.inventory_id;
|
||||
|
||||
var url = ( !Empty(group_id) ) ? GetBasePath('groups') + group_id + '/all_hosts/' :
|
||||
GetBasePath('inventory') + params.inventory_id + '/hosts/';
|
||||
GetBasePath('inventory') + inventory_id + '/hosts/';
|
||||
|
||||
SearchInit({ scope: scope, set: 'hosts', list: InventoryHosts, url: url });
|
||||
PaginateInit({ scope: scope, list: InventoryHosts, url: url });
|
||||
@ -35,10 +36,11 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H
|
||||
return function(params) {
|
||||
|
||||
var scope = params.scope;
|
||||
|
||||
var inventory_id = params.inventory_id;
|
||||
|
||||
var generator = GenerateList;
|
||||
generator.inject(InventoryHosts, { mode: 'edit', id: 'hosts-container', breadCrumbs: false, searchSize: 'col-lg-5' });
|
||||
HostsReload({ scope: scope, group_id: null });
|
||||
HostsReload({ scope: scope, group_id: null, inventory_id: inventory_id });
|
||||
}
|
||||
}])
|
||||
|
||||
|
||||
@ -459,7 +459,7 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
||||
$('.list-header').each(function(index) {
|
||||
if ($(this).attr('id') != fld + '-header') {
|
||||
var icon = $(this).find('i');
|
||||
icon.attr('class','icon-sort');
|
||||
icon.attr('class','fa-sort');
|
||||
}
|
||||
});
|
||||
|
||||
@ -467,18 +467,18 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper'])
|
||||
// and set the sort direction
|
||||
var icon = $('#' + fld + '-header i');
|
||||
var direction = '';
|
||||
if (icon.hasClass('icon-sort')) {
|
||||
icon.removeClass('icon-sort');
|
||||
icon.addClass('icon-sort-up');
|
||||
if (icon.hasClass('fa-sort')) {
|
||||
icon.removeClass('fa-sort');
|
||||
icon.addClass('fa-sort-up');
|
||||
}
|
||||
else if (icon.hasClass('icon-sort-up')) {
|
||||
icon.removeClass('icon-sort-up');
|
||||
icon.addClass('icon-sort-down');
|
||||
else if (icon.hasClass('fa-sort-up')) {
|
||||
icon.removeClass('fa-sort-up');
|
||||
icon.addClass('fa-sort-down');
|
||||
direction = '-';
|
||||
}
|
||||
else if (icon.hasClass('icon-sort-down')) {
|
||||
icon.removeClass('icon-sort-down');
|
||||
icon.addClass('icon-sort-up');
|
||||
else if (icon.hasClass('fa-sort-down')) {
|
||||
icon.removeClass('fa-sort-down');
|
||||
icon.addClass('fa-sort-up');
|
||||
}
|
||||
|
||||
// Set the sorder order value and call the API to refresh the list with the new order
|
||||
|
||||
@ -46,8 +46,6 @@ angular.module('CloudCredentialsListDefinition', [])
|
||||
|
||||
actions: {
|
||||
add: {
|
||||
icon: 'icon-plus',
|
||||
label: 'Create New',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addCredential()',
|
||||
"class": 'btn-sm',
|
||||
@ -58,7 +56,7 @@ angular.module('CloudCredentialsListDefinition', [])
|
||||
fieldActions: {
|
||||
edit: {
|
||||
ngClick: "editCredential(\{\{ credential.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
icon: 'fa-edit',
|
||||
label: 'Edit',
|
||||
"class": 'btn-sm',
|
||||
awToolTip: 'View/Edit credential'
|
||||
@ -66,7 +64,7 @@ angular.module('CloudCredentialsListDefinition', [])
|
||||
|
||||
"delete": {
|
||||
ngClick: "deleteCredential(\{\{ credential.id \}\},'\{\{ credential.name \}\}')",
|
||||
icon: 'icon-trash',
|
||||
icon: 'fa-trash-o',
|
||||
label: 'Delete',
|
||||
"class": 'btn-sm',
|
||||
awToolTip: 'Delete credential'
|
||||
|
||||
@ -55,21 +55,14 @@ angular.module('CredentialsListDefinition', [])
|
||||
|
||||
actions: {
|
||||
add: {
|
||||
icon: 'icon-plus',
|
||||
label: 'Create New',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addCredential()',
|
||||
"class": 'btn-sm',
|
||||
awToolTip: 'Create a new credential'
|
||||
},
|
||||
stream: {
|
||||
'class': "btn-sm activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
},
|
||||
@ -77,7 +70,7 @@ angular.module('CredentialsListDefinition', [])
|
||||
fieldActions: {
|
||||
edit: {
|
||||
ngClick: "editCredential(\{\{ credential.id \}\})",
|
||||
icon: 'icon-edit',
|
||||
icon: 'fa-edit',
|
||||
label: 'Edit',
|
||||
"class": 'btn-sm',
|
||||
awToolTip: 'View/Edit credential'
|
||||
@ -85,7 +78,7 @@ angular.module('CredentialsListDefinition', [])
|
||||
|
||||
"delete": {
|
||||
ngClick: "deleteCredential(\{\{ credential.id \}\},'\{\{ credential.name \}\}')",
|
||||
icon: 'icon-trash',
|
||||
icon: 'fa-trash',
|
||||
label: 'Delete',
|
||||
"class": 'btn-sm',
|
||||
awToolTip: 'Delete credential'
|
||||
|
||||
@ -31,14 +31,10 @@ angular.module('GroupListDefinition', [])
|
||||
help: {
|
||||
awPopOver: "Choose groups by clicking on each group you wish to add. Click the <em>Select</em> button to add the groups to " +
|
||||
"the selected inventory group.",
|
||||
dataPlacement: 'left',
|
||||
dataContainer: '#form-modal .modal-content',
|
||||
icon: "icon-question-sign",
|
||||
mode: 'all',
|
||||
'class': 'btn-xs btn-help pull-right',
|
||||
awToolTip: 'Click for help',
|
||||
dataTitle: 'Adding Groups',
|
||||
iconSize: 'large'
|
||||
dataTitle: 'Adding Groups'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -11,12 +11,13 @@ angular.module('HomeGroupListDefinition', [])
|
||||
.value(
|
||||
'HomeGroupList', {
|
||||
|
||||
name: 'groups',
|
||||
name: 'home_groups',
|
||||
iterator: 'group',
|
||||
editTitle: 'Groups',
|
||||
index: true,
|
||||
hover: true,
|
||||
|
||||
well: true,
|
||||
|
||||
fields: {
|
||||
name: {
|
||||
key: true,
|
||||
@ -111,13 +112,9 @@ angular.module('HomeGroupListDefinition', [])
|
||||
|
||||
actions: {
|
||||
stream: {
|
||||
'class': "btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
},
|
||||
|
||||
@ -82,13 +82,9 @@ angular.module('HomeHostListDefinition', [])
|
||||
|
||||
actions: {
|
||||
stream: {
|
||||
'class': "btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
},
|
||||
|
||||
@ -31,14 +31,10 @@ angular.module('HostListDefinition', [])
|
||||
actions: {
|
||||
help: {
|
||||
awPopOver: "Select hosts by clicking on each host you wish to add. Add the selected hosts to the group by clicking the <em>Select</em> button.",
|
||||
dataPlacement: 'left',
|
||||
dataContainer: '#form-modal .modal-content',
|
||||
icon: "icon-question-sign",
|
||||
mode: 'all',
|
||||
'class': 'btn-xs btn-info btn-help',
|
||||
awToolTip: 'Click for help',
|
||||
dataTitle: 'Selecting Hosts',
|
||||
iconSize: 'large'
|
||||
dataTitle: 'Selecting Hosts'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -82,17 +82,13 @@ angular.module('InventoriesListDefinition', [])
|
||||
|
||||
actions: {
|
||||
add: {
|
||||
label: 'Add',
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addInventory()',
|
||||
awToolTip: 'Create a new inventory'
|
||||
},
|
||||
stream: {
|
||||
label: 'Activity',
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
|
||||
@ -24,7 +24,7 @@ angular.module('InventoryGroupsDefinition', [])
|
||||
name: {
|
||||
label: 'Group',
|
||||
key: true,
|
||||
ngClick: "\{\{ 'GroupsEdit(' + group.id + ')' \}\}",
|
||||
ngClick: "\{\{ 'showHosts(' + group.id + ')' \}\}",
|
||||
//ngClass: "\{\{ 'level' + group.level \}\}",
|
||||
hasChildren: true
|
||||
},
|
||||
@ -100,50 +100,31 @@ angular.module('InventoryGroupsDefinition', [])
|
||||
|
||||
actions: {
|
||||
create: {
|
||||
label: 'Add',
|
||||
mode: 'all',
|
||||
icon: 'icon-plus',
|
||||
ngClick: "createGroup()",
|
||||
ngHide: "groupCreateHide",
|
||||
ngDisabled: 'grpBtnDisabled',
|
||||
awToolTip: "Create a new group",
|
||||
dataPlacement: 'top'
|
||||
awToolTip: "Create a new group"
|
||||
},
|
||||
edit: {
|
||||
label: 'Edit',
|
||||
properties: {
|
||||
mode: 'all',
|
||||
icon: 'icon-wrench',
|
||||
'class': "btn-sm",
|
||||
ngHide: "groupEditHide",
|
||||
ngDisabled: 'grpBtnDisabled',
|
||||
awToolTip: "Edit inventory properties",
|
||||
dataPlacement: 'top'
|
||||
awToolTip: "Edit inventory properties"
|
||||
},
|
||||
refresh: {
|
||||
label: 'Refresh',
|
||||
dataPlacement: 'top',
|
||||
icon: "icon-refresh",
|
||||
mode: 'all',
|
||||
'class': 'btn-sm',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refresh()"
|
||||
},
|
||||
stream: {
|
||||
label: 'Activity',
|
||||
'class': "activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
},
|
||||
help: {
|
||||
label: 'Help',
|
||||
dataPlacement: 'top',
|
||||
icon: "icon-question-sign",
|
||||
mode: 'all',
|
||||
'class': 'btn-sm btn-help',
|
||||
awToolTip:
|
||||
//"<div style=\"text-align:left;\"><img src=\"/static/img/cow.png\" style=\"width:50px; height:56px; float:left; padding-right:5px;\">" +
|
||||
//"<p>Need help getting started creating your inventory?</p><p>Click here for help.</p></div>",
|
||||
|
||||
@ -99,31 +99,21 @@ angular.module('InventoryHostsDefinition', [])
|
||||
|
||||
actions: {
|
||||
create: {
|
||||
label: 'Add',
|
||||
mode: 'all',
|
||||
icon: 'icon-plus',
|
||||
ngClick: "createGroup()",
|
||||
ngHide: "groupCreateHide",
|
||||
ngDisabled: 'grpBtnDisabled',
|
||||
awToolTip: "Create a new host",
|
||||
dataPlacement: 'top'
|
||||
awToolTip: "Create a new host"
|
||||
},
|
||||
stream: {
|
||||
label: 'Activity',
|
||||
'class': "activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
},
|
||||
help: {
|
||||
label: 'Help',
|
||||
dataPlacement: 'top',
|
||||
icon: "icon-question-sign",
|
||||
mode: 'all',
|
||||
'class': 'btn-sm btn-help',
|
||||
awToolTip:
|
||||
//"<div style=\"text-align:left;\"><img src=\"/static/img/cow.png\" style=\"width:50px; height:56px; float:left; padding-right:5px;\">" +
|
||||
//"<p>Need help getting started creating your inventory?</p><p>Click here for help.</p></div>",
|
||||
|
||||
@ -86,13 +86,9 @@ angular.module('JobEventsListDefinition', [])
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
dataPlacement: 'top',
|
||||
icon: "icon-refresh",
|
||||
mode: 'all',
|
||||
'class': 'btn-xs',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refresh()",
|
||||
iconSize: 'large'
|
||||
ngClick: "refresh()"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -111,22 +111,17 @@ angular.module('JobHostDefinition', [])
|
||||
"</dl>\n",
|
||||
dataPlacement: 'left',
|
||||
dataContainer: "body",
|
||||
icon: "icon-question-sign",
|
||||
mode: 'all',
|
||||
'class': 'btn-xs btn-help',
|
||||
awToolTip: 'Click for help',
|
||||
dataTitle: 'Job Host Summary',
|
||||
id: 'jobhost-help-button',
|
||||
iconSize: 'large'
|
||||
id: 'jobhost-help-button'
|
||||
},
|
||||
refresh: {
|
||||
dataPlacement: 'top',
|
||||
icon: "icon-refresh",
|
||||
mode: 'all',
|
||||
'class': 'btn-xs',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refresh()",
|
||||
iconSize: 'large',
|
||||
ngShow: "host_id == null" //don't show when viewing from inventory->hosts
|
||||
}
|
||||
},
|
||||
|
||||
@ -30,22 +30,16 @@ angular.module('JobTemplatesListDefinition', [])
|
||||
|
||||
actions: {
|
||||
add: {
|
||||
label: 'Create New',
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addJobTemplate()',
|
||||
"class": 'btn-xs',
|
||||
basePaths: ['job_templates'],
|
||||
awToolTip: 'Create a new template'
|
||||
},
|
||||
stream: {
|
||||
'class': "btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
},
|
||||
|
||||
@ -76,13 +76,9 @@ angular.module('JobsListDefinition', [])
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
dataPlacement: 'top',
|
||||
icon: "icon-refresh",
|
||||
mode: 'all',
|
||||
'class': 'btn-xs',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refresh()",
|
||||
iconSize: 'large'
|
||||
ngClick: "refresh()"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -29,21 +29,14 @@ angular.module('OrganizationListDefinition', [])
|
||||
|
||||
actions: {
|
||||
add: {
|
||||
label: 'Create New',
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addOrganization()',
|
||||
"class": 'btn-xs',
|
||||
awToolTip: 'Create a new organization'
|
||||
},
|
||||
stream: {
|
||||
'class': "btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
},
|
||||
|
||||
@ -43,22 +43,15 @@ angular.module('PermissionListDefinition', [])
|
||||
|
||||
actions: {
|
||||
add: {
|
||||
icon: 'icon-plus',
|
||||
label: 'Create New',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addPermission()',
|
||||
"class": 'btn-xs',
|
||||
awToolTip: 'Add a new permission',
|
||||
ngShow: 'PermissionAddAllowed'
|
||||
},
|
||||
stream: {
|
||||
'class': "btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
},
|
||||
|
||||
@ -57,11 +57,8 @@ angular.module('ProjectsListDefinition', [])
|
||||
|
||||
actions: {
|
||||
add: {
|
||||
label: 'Create New',
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addProject()',
|
||||
"class": 'btn-xs',
|
||||
awToolTip: 'Create a new project'
|
||||
},
|
||||
help: {
|
||||
@ -75,31 +72,19 @@ angular.module('ProjectsListDefinition', [])
|
||||
"</dl>\n",
|
||||
dataPlacement: 'left',
|
||||
dataContainer: 'body',
|
||||
icon: "icon-question-sign",
|
||||
mode: 'all',
|
||||
'class': 'btn-xs btn-help',
|
||||
awToolTip: 'Click for help',
|
||||
awTipPlacement: 'top',
|
||||
dataTitle: 'Project Status',
|
||||
iconSize: 'large'
|
||||
awTipPlacement: 'top'
|
||||
},
|
||||
refresh: {
|
||||
dataPlacement: 'top',
|
||||
icon: "icon-refresh",
|
||||
mode: 'all',
|
||||
'class': 'btn-xs',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refresh()",
|
||||
iconSize: 'large'
|
||||
ngClick: "refresh()"
|
||||
},
|
||||
stream: {
|
||||
'class': "btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
},
|
||||
|
||||
@ -205,30 +205,23 @@ angular.module('StreamListDefinition', [])
|
||||
|
||||
actions: {
|
||||
refresh: {
|
||||
dataPlacement: 'top',
|
||||
icon: "icon-refresh",
|
||||
mode: 'all',
|
||||
'class': 'btn-xs',
|
||||
awToolTip: "Refresh the page",
|
||||
ngClick: "refreshStream()",
|
||||
iconSize: 'large'
|
||||
ngClick: "refreshStream()"
|
||||
},
|
||||
close: {
|
||||
dataPlacement: 'top',
|
||||
icon: "icon-arrow-left",
|
||||
mode: 'all',
|
||||
'class': 'btn-xs',
|
||||
awToolTip: "Close Activity Stream view",
|
||||
ngClick: "closeStream()",
|
||||
iconSize: 'large'
|
||||
ngClick: "closeStream()"
|
||||
}
|
||||
},
|
||||
|
||||
fieldActions: {
|
||||
edit: {
|
||||
view: {
|
||||
label: 'View',
|
||||
ngClick: "showDetail(\{\{ activity.id \}\})",
|
||||
icon: 'icon-zoom-in',
|
||||
icon: 'fa-zoom-in',
|
||||
"class": 'btn-default btn-xs',
|
||||
awToolTip: 'View event details',
|
||||
dataPlacement: 'top'
|
||||
|
||||
@ -36,21 +36,14 @@ angular.module('TeamsListDefinition', [])
|
||||
|
||||
actions: {
|
||||
add: {
|
||||
label: 'Create New',
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addTeam()',
|
||||
"class": 'btn-xs',
|
||||
awToolTip: 'Create a new team'
|
||||
},
|
||||
stream: {
|
||||
'class': "btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
},
|
||||
|
||||
@ -36,7 +36,6 @@ angular.module('UserListDefinition', [])
|
||||
actions: {
|
||||
add: {
|
||||
label: 'Create New',
|
||||
icon: 'icon-plus',
|
||||
mode: 'all', // One of: edit, select, all
|
||||
ngClick: 'addUser()',
|
||||
basePaths: ['organizations','users'], // base path must be in list, or action not available
|
||||
@ -44,13 +43,9 @@ angular.module('UserListDefinition', [])
|
||||
awToolTip: 'Create a new user'
|
||||
},
|
||||
stream: {
|
||||
'class': "btn-xs activity-btn",
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
}
|
||||
},
|
||||
|
||||
@ -348,7 +348,6 @@ a:hover {
|
||||
a,
|
||||
a:active,
|
||||
a:visited {
|
||||
margin-right: 15px;
|
||||
color: @grey;
|
||||
}
|
||||
|
||||
@ -362,7 +361,7 @@ a:hover {
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
@ -371,7 +370,6 @@ a:hover {
|
||||
|
||||
.copyright {
|
||||
padding-top: 15px;
|
||||
display: inline-block;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
}
|
||||
@ -1439,6 +1437,16 @@ tr td button i {
|
||||
|
||||
/* Portrait tablet to landscape and desktop */
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.site-footer {
|
||||
.logo {
|
||||
text-align: center;
|
||||
padding-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 1199px) {
|
||||
|
||||
.list-actions button, .list-actions .checkbox-inline {
|
||||
@ -1478,7 +1486,7 @@ tr td button i {
|
||||
/* Landscape phone to portrait tablet */
|
||||
|
||||
@media (max-width: 767px) {
|
||||
|
||||
|
||||
/* Job events */
|
||||
|
||||
.level-1,
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
.factory('GenerateForm', ['$rootScope', '$location', '$cookieStore', '$compile', 'SearchWidget', 'PaginateWidget', 'Attr',
|
||||
'Icon', 'Column', 'NavigationLink', 'HelpCollapse', 'Button', 'DropDown', 'Empty',
|
||||
'Icon', 'Column', 'NavigationLink', 'HelpCollapse', 'Button', 'DropDown', 'Empty', 'SelectIcon',
|
||||
function($rootScope, $location, $cookieStore, $compile, SearchWidget, PaginateWidget, Attr, Icon, Column, NavigationLink,
|
||||
HelpCollapse, Button, DropDown, Empty) {
|
||||
HelpCollapse, Button, DropDown, Empty, SelectIcon) {
|
||||
return {
|
||||
|
||||
setForm: function(form) {
|
||||
@ -60,11 +60,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
this.modal = (options.modal) ? true : false;
|
||||
this.setForm(form);
|
||||
|
||||
// Inject the html
|
||||
if (options.buildTree) {
|
||||
element.html(this.buildTree(options));
|
||||
}
|
||||
else if (options.html) {
|
||||
if (options.html) {
|
||||
element.html(options.html);
|
||||
}
|
||||
else {
|
||||
@ -80,7 +76,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
|
||||
$compile(element)(this.scope);
|
||||
|
||||
if (!options.buildTree && !options.html) {
|
||||
if (!options.html) {
|
||||
// Reset the scope to prevent displaying old data from our last visit to this form
|
||||
for (var fld in form.fields) {
|
||||
this.scope[fld] = null;
|
||||
@ -244,11 +240,11 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
else {
|
||||
this.scope.accordionToggle = function(selector) {
|
||||
$(selector).collapse('toggle');
|
||||
if ( $(selector + '-icon').hasClass('icon-minus') ) {
|
||||
$(selector + '-icon').removeClass('icon-minus').addClass('icon-plus');
|
||||
if ( $(selector + '-icon').hasClass('fa-minus') ) {
|
||||
$(selector + '-icon').removeClass('fa-minus').addClass('fa-plus');
|
||||
}
|
||||
else {
|
||||
$(selector + '-icon').removeClass('icon-plus').addClass('icon-minus')
|
||||
$(selector + '-icon').removeClass('fa-plus').addClass('fa-minus')
|
||||
}
|
||||
}
|
||||
|
||||
@ -523,7 +519,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
html += "class=\"btn btn-default\" ng-click=\"clear('" + fld + "','" + field.associated + "')\" " +
|
||||
"aw-tool-tip=\"Clear " + field.label + "\" id=\"" + fld + "-clear-btn\" ";
|
||||
html += (field.ask) ? "ng-disabled=\"" + fld + "_ask\" " : "";
|
||||
html += " ><i class=\"icon-undo\"></i></button>\n";
|
||||
html += " ><i class=\"fa fa-undo\"></i></button>\n";
|
||||
html += "</span>\n</div>\n";
|
||||
if (field.ask) {
|
||||
html += "<label class=\"checkbox-inline ask-checkbox\" ";
|
||||
@ -539,7 +535,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
if (field.genMD5) {
|
||||
html += "<span class=\"input-group-btn\"><button type=\"button\" class=\"btn btn-default\" ng-click=\"genMD5('" + fld + "')\" " +
|
||||
"aw-tool-tip=\"Generate " + field.label + "\" data-placement=\"top\" id=\"" + this.form.name + "_" + fld + "_gen_btn\">" +
|
||||
"<i class=\"icon-magic\"></i></button></span>\n</div>\n";
|
||||
"<i class=\"fa fa-magic\"></i></button></span>\n</div>\n";
|
||||
}
|
||||
|
||||
// Add error messages
|
||||
@ -864,7 +860,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
html += "class=\"" + getFieldWidth() + "\">\n";
|
||||
html += "<div class=\"input-group\">\n";
|
||||
html += "<span class=\"input-group-btn\">\n";
|
||||
html += "<button type=\"button\" class=\"lookup-btn btn btn-default\" " + this.attr(field,'ngClick') + "><i class=\"icon-search\"></i></button>\n";
|
||||
html += "<button type=\"button\" class=\"lookup-btn btn btn-default\" " + this.attr(field,'ngClick') + "><i class=\"fa fa-search\"></i></button>\n";
|
||||
html += "</span>\n";
|
||||
html += "<input type=\"text\" class=\"form-control input-medium lookup\" ";
|
||||
html += "ng-model=\"" + field.sourceModel + '_' + field.sourceField + "\" ";
|
||||
@ -955,7 +951,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
html = "<div class=\"list-actions\">\n";
|
||||
for (action in this.form.actions) {
|
||||
if (this.form.actions[action].mode == 'all' || this.form.actions[action].mode == options.mode) {
|
||||
html += this.button(this.form.actions[action], action);
|
||||
html += this.button({ btn: this.form.actions[action], action: action, toolbar: true });
|
||||
}
|
||||
}
|
||||
html += "</div>\n";
|
||||
@ -1006,7 +1002,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
if (navigation[itm].active) {
|
||||
html += "<a href=\"\" class=\"toggle\" ";
|
||||
html += "data-toggle=\"dropdown\" ";
|
||||
html += ">" + navigation[itm].label + " <i class=\"icon-chevron-sign-down crumb-icon\"></i></a>";
|
||||
html += ">" + navigation[itm].label + " <i class=\"fa fa-chevron-circle-down crumb-icon\"></i></a>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1017,7 +1013,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
navigation[itm].href + "\" ";
|
||||
// html += (navigation[itm].active) ? "class=\"active\" " : "";
|
||||
html += ">";
|
||||
html += "<i class=\"icon-ok\" style=\"visibility: ";
|
||||
html += "<i class=\"fa fa-check\" style=\"visibility: ";
|
||||
html += (navigation[itm].active) ? "visible" : "hidden";
|
||||
html += "\"></i> ";
|
||||
html += (navigation[itm].listLabel) ? navigation[itm].listLabel : navigation[itm].label;
|
||||
@ -1064,7 +1060,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
var act;
|
||||
for (action in this.form.statusActions) {
|
||||
act = this.form.statusActions[action];
|
||||
html += this.button(act, action);
|
||||
html += this.button({ btn: act, action: action, toolbar: true });
|
||||
}
|
||||
html += "</div>\n";
|
||||
//html += "<div class=\"status-spin\"><i class=\"icon-spinner icon-spin\" ng-show=\"statusSearchSpin == true\"></i></div>\n";
|
||||
@ -1114,7 +1110,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
if (this.has('titleActions')) {
|
||||
html += "<div class=\"title-actions pull-right\">\n";
|
||||
for (btn in this.form.titleActions) {
|
||||
html += this.button(this.form.titleActions[btn]);
|
||||
html += this.button({ btn: this.form.titleActions[btn], action: btn, toolbar: true });
|
||||
}
|
||||
html += "</div>\n";
|
||||
}
|
||||
@ -1232,10 +1228,8 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
}
|
||||
}
|
||||
html += ">";
|
||||
if (button.icon) {
|
||||
html += this.icon(button.icon);
|
||||
}
|
||||
html += button.label + "</button>\n";
|
||||
html += SelectIcon({ action: btn });
|
||||
html += " " + button.label + "</button>\n";
|
||||
}
|
||||
}
|
||||
html += "</div>\n";
|
||||
@ -1295,203 +1289,6 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies', 'Utilities'])
|
||||
|
||||
},
|
||||
|
||||
buildTree: function(options) {
|
||||
//
|
||||
// Used to create the inventory detail view
|
||||
//
|
||||
|
||||
var form = this.form;
|
||||
var itm = "groups";
|
||||
var html = '';
|
||||
var navigation = {
|
||||
inventory: {
|
||||
href: "/#/inventories/{{ inventory_id }}",
|
||||
label: "Properties",
|
||||
icon: "icon-edit"
|
||||
},
|
||||
hosts: {
|
||||
href: "/#/inventories/{{ inventory_id }}/hosts",
|
||||
label: 'Hosts',
|
||||
icon: 'icon-laptop'
|
||||
},
|
||||
groups: {
|
||||
href: "/#/inventories/{{ inventory_id }}/groups",
|
||||
label: 'Groups',
|
||||
icon: 'icon-sitemap'
|
||||
}
|
||||
};
|
||||
|
||||
if (form.type == 'groupsview') {
|
||||
navigation.inventory.active = false;
|
||||
navigation.hosts.active = false;
|
||||
navigation.groups.active = true;
|
||||
html += this.breadCrumbs(options, navigation);
|
||||
html += "<div class=\"row\">\n";
|
||||
html += "<div class=\"col-lg-4\" id=\"search-tree-target\">\n" +
|
||||
"<div class=\"search-tree well\">\n" +
|
||||
"<div id=\"search-tree-container\"></div>\n" +
|
||||
"</div><!-- search-tree well -->\n" +
|
||||
"</div>\n";
|
||||
html += "<div class=\"col-lg-8 tree-form-container\">\n";
|
||||
html += "<div id=\"tree-form\">\n</div>\n";
|
||||
html += "</div>\n";
|
||||
html += "</div><!-- row -->\n";
|
||||
}
|
||||
else {
|
||||
// build the hosts page
|
||||
navigation.inventory.active = false;
|
||||
navigation.hosts.active = true;
|
||||
navigation.groups.active = false;
|
||||
html += this.breadCrumbs(options, navigation);
|
||||
html += "<div class=\"row\">\n";
|
||||
html += "<div class=\"col-lg-4\" id=\"search-tree-target\">\n";
|
||||
html += "<div class=\"search-tree well\">\n";
|
||||
html += "<div id=\"search-tree-container\">\n</div><!-- search-tree-container -->\n";
|
||||
html += "</div><!-- search-tree well -->\n";
|
||||
html += "</div><!-- col-lg-4 -->\n";
|
||||
html += "<div class=\"col-lg-8\">\n";
|
||||
html += "<div class=\"hosts-well well\">\n";
|
||||
html += SearchWidget({ iterator: form.iterator, template: form, mini: true, size: 'col-md-5 col-lg-5'});
|
||||
html += "<div class=\"col-md-7 col-lg-7\">\n"
|
||||
html += "<div class=\"list-actions\">\n";
|
||||
|
||||
// Add actions(s)
|
||||
for (var action in form.actions) {
|
||||
html += this.button(form.actions[action], action);
|
||||
}
|
||||
html += "</div><!-- list-actions -->\n";
|
||||
html += "</div>\n";
|
||||
html += "</div><!-- row -->\n";
|
||||
html += "<div class=\"title\" ng-bind=\"groupTitle\"></div>\n";
|
||||
|
||||
// Start the list
|
||||
html += "<div class=\"list\">\n";
|
||||
html += "<table id=\"hosts_table\" class=\"" + form.iterator + " table table-condensed table-hover\">\n";
|
||||
html += "<thead>\n";
|
||||
html += "<tr>\n";
|
||||
|
||||
for (var fld in form.fields) {
|
||||
if (form.fields[fld].searchOnly == undefined || form.fields[fld].searchOnly == false) {
|
||||
html += "<th class=\"list-header\" id=\"" + fld + "-header\" ";
|
||||
html += (!form.fields[fld].nosort) ? "ng-click=\"sort('"+ fld + "')\"" : "";
|
||||
html += ">";
|
||||
html += (form['fields'][fld].label && form['fields'][fld].type !== 'DropDown') ? form['fields'][fld].label : '';
|
||||
if (form.fields[fld].nosort == undefined || form.fields[fld].nosort == false) {
|
||||
html += " <i class=\"";
|
||||
if (form.fields[fld].key) {
|
||||
if (form.fields[fld].desc) {
|
||||
html += "icon-sort-down";
|
||||
}
|
||||
else {
|
||||
html += "icon-sort-up";
|
||||
}
|
||||
}
|
||||
else {
|
||||
html += "icon-sort";
|
||||
}
|
||||
html += "\"></i>";
|
||||
}
|
||||
html += "</th>\n";
|
||||
}
|
||||
}
|
||||
|
||||
html += "<th></th>\n";
|
||||
html += "</tr>\n";
|
||||
html += "</thead>";
|
||||
html += "<tbody>\n";
|
||||
|
||||
html += "<tr ng-repeat=\"" + form.iterator + " in hosts\" >\n";
|
||||
|
||||
// Select checkbox
|
||||
//html += "<td><input type=\"checkbox\" ng-model=\"" + form.iterator + ".selected\" ng-change=\"toggleOneHost()\" ></td>";
|
||||
|
||||
var cnt = 0;
|
||||
var rfield;
|
||||
|
||||
for (var fld in form.fields) {
|
||||
cnt++;
|
||||
rfield = form.fields[fld];
|
||||
if (fld == 'groups' ) {
|
||||
// generate group form control/button widget
|
||||
html += "<td class=\"col-lg-5 col-md-4 col-sm-3\">";
|
||||
html += "<div class=\"input-group input-group-sm\">\n";
|
||||
html += "<span class=\"input-group-btn\">\n";
|
||||
html += "<button class=\"btn btn-default\" type=\"button\" id=\"edit_groups_btn\" ng-click=\"editHostGroups({{ host.id }})\" " +
|
||||
"aw-tool-tip=\"Edit group associations\" data-placement=\"top\" >" +
|
||||
"<i class=\"icon-sitemap\"></i></button>\n";
|
||||
html += "</span>\n";
|
||||
html += "<input type=\"text\" id=\"host_groups\" ng-model=\"host.groups\" class=\"form-control\" disabled=\"disabled\" >\n";
|
||||
html += "</div>\n";
|
||||
html += "</td>\n";
|
||||
}
|
||||
else {
|
||||
if (form.fields[fld].searchOnly == undefined || form.fields[fld].searchOnly == false) {
|
||||
html += Column({ list: form, fld: fld, options: options, base: null });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Row level actions
|
||||
html += "<td class=\"actions\">";
|
||||
for (act in form.fieldActions) {
|
||||
var action = form.fieldActions[act];
|
||||
if (action.type && action.type == 'DropDown') {
|
||||
html += DropDown({ field: action, td: false });
|
||||
}
|
||||
else {
|
||||
html += "<button type=\"button\" ";
|
||||
html += "id=\"row_" + act + "_btn\" ";
|
||||
html += "class=\"btn";
|
||||
html += (action['class']) ? " " + action['class'] : "";
|
||||
html += "\" " + this.attr(action,'ngClick');
|
||||
html += (action.awToolTip) ? this.attr(action,'awToolTip') : "";
|
||||
html += (action.awToolTip) ? "data-placement=\"top\" " : "";
|
||||
html += ">" + this.icon(action.icon);
|
||||
html += (action.label) ? " " + action.label : "";
|
||||
html += "</button> ";
|
||||
}
|
||||
}
|
||||
html += "</td>";
|
||||
html += "</tr>\n";
|
||||
cnt++;
|
||||
|
||||
// Message for when a related collection is empty
|
||||
html += "<tr class=\"info\" ng-show=\"" + form.iterator + "Loading == false && (hosts == null || hosts.length == 0)\">\n";
|
||||
html += "<td colspan=\"" + cnt + "\"><div class=\"alert alert-info\">No records matched your search.</div></td>\n";
|
||||
html += "</tr>\n";
|
||||
|
||||
// Message for loading
|
||||
html += "<tr class=\"info\" ng-show=\"HostsLoading == true\">\n";
|
||||
html += "<td colspan=\"" + cnt + "\"><div class=\"alert alert-info\">Loading...</div></td>\n";
|
||||
html += "</tr>\n";
|
||||
|
||||
// End List
|
||||
html += "</tbody>\n";
|
||||
html += "</table>\n";
|
||||
html += "</div>\n"; // close list
|
||||
|
||||
/*
|
||||
html += "<div class=\"row host-failure-filter\">\n";
|
||||
html += "<div class=\"col-lg-12\">\n";
|
||||
html += "<label class=\"checkbox-inline pull-right\"><input type=\"checkbox\" ng-model=\"hostFailureFilter\" ng-change=\"filterHosts()\" > Only show hosts with failed jobs" +
|
||||
"</label>\n";
|
||||
html += "</div>\n";
|
||||
html += "</div>\n";
|
||||
*/
|
||||
|
||||
html += "</div>\n"; // close well
|
||||
|
||||
html += PaginateWidget({ set: 'hosts', iterator: form.iterator, mini: true });
|
||||
|
||||
html += "</div>\n";
|
||||
html += "</div>\n";
|
||||
|
||||
//html += "</div><!-- inventory-hosts -->\n";
|
||||
|
||||
}
|
||||
return html;
|
||||
},
|
||||
|
||||
buildCollections: function(options) {
|
||||
//
|
||||
// Create TB accordians with imbedded lists for related collections
|
||||
|
||||
@ -54,7 +54,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
result += (obj.dataPlacement) ? "data-placement=\"" + obj['dataPlacement'].replace(/[\'\"]/g, '"') + "\" " : "";
|
||||
result += (obj.dataContainer) ? "data-container=\"" + obj['dataContainer'].replace(/[\'\"]/g, '"') + "\" " : "";
|
||||
result += "class=\"help-link\" ";
|
||||
result += "><i class=\"icon-question-sign\"></i></a> ";
|
||||
result += "><i class=\"fa fa-question-circle\"></i></a> ";
|
||||
break;
|
||||
case 'dataTitle':
|
||||
result = "data-title=\"" + value + "\" ";
|
||||
@ -73,8 +73,8 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
break;
|
||||
case 'icon':
|
||||
// new method of constructing <i> icon tag. Replces Icon method.
|
||||
result = "<i class=\"" + value;
|
||||
result += (obj['iconSize']) ? " icon-" + obj['iconSize'] : "";
|
||||
result = "<i class=\"fa fa-" + value;
|
||||
result += (obj['iconSize']) ? " " + obj['iconSize'] : "";
|
||||
result += "\"></i>";
|
||||
break;
|
||||
case 'autocomplete':
|
||||
@ -93,35 +93,102 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
|
||||
.factory('Icon', function() {
|
||||
return function(icon) {
|
||||
return "<i class=\"" + icon + "\"></i> ";
|
||||
return "<i class=\"fa " + icon + "\"></i> ";
|
||||
}
|
||||
})
|
||||
|
||||
.factory('Button', ['Attr', function(Attr) {
|
||||
return function(btn, action) {
|
||||
// pass in button object, get back html
|
||||
var html = '';
|
||||
if (btn.awRefresh) {
|
||||
html += "<div class=\"refresh-grp\" ";
|
||||
html += (btn.ngShow) ? Attr(btn, 'ngShow') : "";
|
||||
html += ">\n";
|
||||
.factory('SelectIcon', ['Icon', function(Icon) {
|
||||
return function(params) {
|
||||
// Common point for matching any type of action to the appropriate
|
||||
// icon. The intention is to maintain consistent meaning and presentation
|
||||
// for every icon used in the application.
|
||||
var icon;
|
||||
var action = params.action;
|
||||
var size = params.size;
|
||||
switch(action) {
|
||||
case 'help':
|
||||
icon = "fa-question-circle";
|
||||
break;
|
||||
case 'add':
|
||||
case 'create':
|
||||
icon= "fa-plus";
|
||||
break;
|
||||
case 'edit':
|
||||
icon = "fa-pencil";
|
||||
break;
|
||||
case 'delete':
|
||||
icon = "fa-trash-o";
|
||||
break;
|
||||
case 'update':
|
||||
case 'group_update':
|
||||
case 'scm_update':
|
||||
icon = 'fa-cloud-download';
|
||||
break;
|
||||
case 'cancel':
|
||||
icon = 'fa-minus-circle';
|
||||
break;
|
||||
case 'run':
|
||||
case 'rerun':
|
||||
case 'submit':
|
||||
icon = 'fa-rocket';
|
||||
break;
|
||||
case 'stream':
|
||||
icon = 'fa-clock-o';
|
||||
break;
|
||||
case 'refresh':
|
||||
icon = 'fa-refresh';
|
||||
break;
|
||||
case 'close':
|
||||
icon='fa-arrow-left';
|
||||
break;
|
||||
case 'save':
|
||||
icon='fa-check-square-o';
|
||||
break;
|
||||
case 'reset':
|
||||
icon="fa-undo";
|
||||
break;
|
||||
case 'view':
|
||||
icon="fa-search-plus";
|
||||
break;
|
||||
}
|
||||
icon += (size) ? " " + size : "";
|
||||
return Icon(icon);
|
||||
}
|
||||
}])
|
||||
|
||||
|
||||
.factory('Button', ['Attr', 'SelectIcon', function(Attr, SelectIcon) {
|
||||
return function(params) {
|
||||
|
||||
// pass in button object, get back html
|
||||
|
||||
var btn = params.btn;
|
||||
var action = params.action;
|
||||
var toolbar = params.toolbar;
|
||||
|
||||
if (toolbar) {
|
||||
//if this is a toolbar button, set some defaults
|
||||
btn['class'] = 'btn-xs btn-primary';
|
||||
btn['iconSize'] = 'fa-lg';
|
||||
delete btn['label'];
|
||||
}
|
||||
|
||||
var html = '';
|
||||
|
||||
html += "<button type=\"button\" ";
|
||||
html += "class=\"btn";
|
||||
if (btn.awRefresh && !btn['class']) {
|
||||
html += ' btn-xs refresh-btn';
|
||||
}
|
||||
else
|
||||
|
||||
if (btn['class']) {
|
||||
html += ' ' + btn['class'];
|
||||
}
|
||||
else {
|
||||
html += " btn-sm";
|
||||
}
|
||||
|
||||
html += (btn['awPopOver']) ? " help-link-white" : "";
|
||||
html += "\" ";
|
||||
html += (btn.ngClick) ? Attr(btn, 'ngClick') : "";
|
||||
html += (btn.awRefresh) ? " ng-click=\"refreshCnt = " + $AnsibleConfig.refresh_rate + "; refresh()\" " : "";
|
||||
|
||||
if (btn.id) {
|
||||
html += "id=\"" + btn.id + "\" ";
|
||||
}
|
||||
@ -130,10 +197,10 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
html += "id=\"" + action + "_btn\" ";
|
||||
}
|
||||
}
|
||||
|
||||
html += (btn.ngHide) ? Attr(btn,'ngHide') : "";
|
||||
html += (btn.awToolTip) ? Attr(btn,'awToolTip') : "";
|
||||
html += (btn.awToolTip && btn.dataPlacement == undefined) ? "data-placement=\"top\" " : "";
|
||||
html += (btn.awRefresh && !btn.awTooltip) ? "aw-tool-tip=\"Refresh page\" data-placement=\"top\" ": "";
|
||||
html += (btn.awPopOver) ? "aw-pop-over=\"" +
|
||||
btn.awPopOver.replace(/[\'\"]/g, '"') + "\" " : "";
|
||||
html += (btn.dataPlacement) ? Attr(btn, 'dataPlacement') : "";
|
||||
@ -146,18 +213,17 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
html += (btn.awTipPlacement) ? Attr(btn, 'awTipPlacement') : "";
|
||||
html += " >";
|
||||
html += (btn['img']) ? "<img src=\"" + $basePath + "img/" + btn.img + "\" style=\"width: 12px; height: 12px;\" >" : "";
|
||||
html += (btn['icon']) ? Attr(btn,'icon') : "";
|
||||
html += (btn['awRefresh'] && !btn['icon']) ? "<i class=\"icon-refresh\"></i> " : "";
|
||||
html += (btn.label) ? "<br />" + btn.label : "";
|
||||
|
||||
html += SelectIcon({ action: action, size: btn.iconSize });
|
||||
|
||||
html += (btn.label) ? " " + btn.label : "";
|
||||
html += "</button> ";
|
||||
if (btn['awRefresh']) {
|
||||
html += '<span class=\"refresh-msg\" aw-refresh>{{ refreshMsg }}</span>\n';
|
||||
html += "</div><!-- refresh-grp -->\n";
|
||||
}
|
||||
|
||||
return html;
|
||||
}
|
||||
}])
|
||||
|
||||
|
||||
.factory('NavigationLink', ['Attr', 'Icon', function(Attr, Icon) {
|
||||
return function(link) {
|
||||
var html = "<a ";
|
||||
@ -172,6 +238,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
}
|
||||
}])
|
||||
|
||||
|
||||
.factory('DropDown', ['Attr', 'Icon', function(Attr, Icon) {
|
||||
return function(params) {
|
||||
|
||||
@ -323,6 +390,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
}
|
||||
}])
|
||||
|
||||
|
||||
.factory('Column', ['Attr', 'Icon', 'DropDown', 'Badge', 'BadgeCount', function(Attr, Icon, DropDown, Badge, BadgeCount) {
|
||||
return function(params) {
|
||||
var list = params['list'];
|
||||
@ -462,8 +530,8 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
html += "<div class=\"panel panel-default\">\n";
|
||||
html += "<div class=\"panel-heading\" ng-click=\"accordionToggle('#accordion" + idx + "')\">\n";
|
||||
html += "<h4 class=\"panel-title\">\n";
|
||||
html += "<i class=\"icon-question-sign help-collapse\"></i> " + hdr;
|
||||
html += "<i class=\"icon-minus pull-right collapse-help-icon\" id=\"accordion" + idx + "-icon\"></i>";
|
||||
html += "<i class=\"fa-question-circle help-collapse\"></i> " + hdr;
|
||||
html += "<i class=\"fa fa-minus pull-right collapse-help-icon\" id=\"accordion" + idx + "-icon\"></i>";
|
||||
html += "</h4>\n";
|
||||
html += "</div>\n";
|
||||
html += "<div id=\"accordion" + idx + "\" class=\"panel-collapse collapse in\">\n";
|
||||
@ -544,7 +612,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
// Reset button for drop-down
|
||||
html += "<div class=\"input-group-btn\" ng-show=\"" + iterator + "SelectShow" + modifier + "\" >\n";
|
||||
html += "<button type=\"button\" class=\"btn btn-default btn-small\" ng-click=\"resetSearch('" + iterator + "')\" " +
|
||||
"aw-tool-tip=\"Clear the search\" data-placement=\"top\"><i class=\"icon-remove\"></i></button>\n";
|
||||
"aw-tool-tip=\"Clear the search\" data-placement=\"top\"><i class=\"fa fa-times\"></i></button>\n";
|
||||
html += "</div><!-- input-group-btn -->\n";
|
||||
|
||||
html += "</div><!-- input-group -->\n";
|
||||
@ -554,14 +622,14 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
iterator + "ShowStartBtn" + modifier + " || " +
|
||||
iterator + "HoldInput" + modifier + " || " +
|
||||
iterator + "HideAllStartBtn" + modifier + "\"" +
|
||||
"><i class=\"icon-remove\"></i></a>\n";
|
||||
"><i class=\"fa fa-times\"></i></a>\n";
|
||||
|
||||
html += "<a class=\"search-reset-start\" ng-click=\"search('" + iterator + "')\"" +
|
||||
"ng-hide=\"" + iterator + "SelectShow" + modifier + " || " + iterator + "InputHide" + modifier + " || " +
|
||||
"!" + iterator + "ShowStartBtn" + modifier + " || " +
|
||||
iterator + "HoldInput" + modifier + " || " +
|
||||
iterator + "HideAllStartBtn" + modifier + "\"" +
|
||||
"><i class=\"icon-search\"></i></a>\n";
|
||||
"><i class=\"fa fa-search\"></i></a>\n";
|
||||
|
||||
html += "</div><!-- col-lg-x -->\n";
|
||||
}
|
||||
@ -600,12 +668,12 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
html += (useMini) ? " btn-xs\" " : "\" ";
|
||||
html += "id=\"previous_page_btn\" ";
|
||||
html += "ng-click=\"prevSet('" + set + "','" + iterator + "')\" " +
|
||||
"ng-disabled=\"" + iterator + "PrevUrl == null || " + iterator + "PrevUrl == undefined\"><i class=\"icon-caret-left\"></i> Prev</button>\n";
|
||||
"ng-disabled=\"" + iterator + "PrevUrl == null || " + iterator + "PrevUrl == undefined\"><i class=\"fa fa-caret-left\"></i> Prev</button>\n";
|
||||
html += "<button type=\"button\" class=\"next btn btn-light";
|
||||
html += (useMini) ? " btn-xs\" " : "\" ";
|
||||
html += "id=\"next_page_btn\" ";
|
||||
html += " ng-click=\"nextSet('" + set + "','" + iterator + "')\"" +
|
||||
"ng-disabled=\"" + iterator + "NextUrl == null || " + iterator + "NextUrl == undefined\">Next <i class=\"icon-caret-right\"></i></button>\n";
|
||||
"ng-disabled=\"" + iterator + "NextUrl == null || " + iterator + "NextUrl == undefined\">Next <i class=\"fa fa-caret-right\"></i></button>\n";
|
||||
|
||||
if (mode != 'lookup') {
|
||||
html += "<label class=\"page-size-label\">Rows per page: </label>\n";
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
|
||||
angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
.factory('GenerateList', [ '$location', '$compile', '$rootScope', 'SearchWidget', 'PaginateWidget', 'Attr', 'Icon',
|
||||
'Column', 'DropDown', 'NavigationLink', 'Button',
|
||||
function($location, $compile, $rootScope, SearchWidget, PaginateWidget, Attr, Icon, Column, DropDown, NavigationLink, Button) {
|
||||
'Column', 'DropDown', 'NavigationLink', 'Button', 'SelectIcon',
|
||||
function($location, $compile, $rootScope, SearchWidget, PaginateWidget, Attr, Icon, Column, DropDown, NavigationLink, Button, SelectIcon) {
|
||||
return {
|
||||
|
||||
setList: function(list) {
|
||||
@ -159,7 +159,7 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
navigation[itm].href + "\" ";
|
||||
// html += (navigation[itm].active) ? "class=\"active\" " : "";
|
||||
html += ">";
|
||||
html += "<i class=\"icon-ok\" style=\"visibility: ";
|
||||
html += "<i class=\"fa fa-check\" style=\"visibility: ";
|
||||
html += (navigation[itm].active) ? "visible" : "hidden";
|
||||
html += "\"></i> ";
|
||||
html += navigation[itm].label;
|
||||
@ -238,17 +238,12 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
|
||||
html += "<div class=\"list-actions\">\n";
|
||||
|
||||
// Add toolbar buttons or 'actions'
|
||||
for (action in list.actions) {
|
||||
if (list.actions[action].mode == 'all' || list.actions[action].mode == options.mode) {
|
||||
if ( (list.actions[action].basePaths == undefined) ||
|
||||
(list.actions[action].basePaths && list.actions[action].basePaths.indexOf(base) > -1) ) {
|
||||
list.actions[action]['class'] = 'btn-xs btn-primary';
|
||||
list.actions[action]['iconSize'] = 'large';
|
||||
delete list.actions[action]['label'];
|
||||
if (action == 'stream') {
|
||||
list.actions[action]['icon'] = 'icon-time';
|
||||
}
|
||||
html += this.button(list.actions[action], action);
|
||||
html += this.button({ btn: list.actions[action], action: action, toolbar: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -312,17 +307,17 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
html += ">";
|
||||
html += list.fields[fld].label;
|
||||
if (list.fields[fld].nosort === undefined || list.fields[fld].nosort !== true) {
|
||||
html += " <i class=\"";
|
||||
html += " <i class=\"fa ";
|
||||
if (list.fields[fld].key) {
|
||||
if (list.fields[fld].desc) {
|
||||
html += "icon-sort-down";
|
||||
html += "fa-sort-down";
|
||||
}
|
||||
else {
|
||||
html += "icon-sort-up";
|
||||
html += "fa-sort-up";
|
||||
}
|
||||
}
|
||||
else {
|
||||
html += "icon-sort";
|
||||
html += "fa-sort";
|
||||
}
|
||||
html += "\"></i></a>";
|
||||
}
|
||||
@ -381,9 +376,6 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
});
|
||||
}
|
||||
else {
|
||||
//list.fieldActions[action]['class'] = 'btn-xs btn-default';
|
||||
//list.fieldActions[action]['iconSize'] = 'large';
|
||||
//html += this.button(list.fieldActions[action]);
|
||||
var fAction = list.fieldActions[action];
|
||||
html += "<a ";
|
||||
html += (fAction.href) ? "href=\"" + fAction.href + "\" " : "";
|
||||
@ -391,8 +383,8 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
html += (fAction.ngHref) ? this.attr(fAction,'ngHref') : "";
|
||||
html += (fAction.ngShow) ? this.attr(fAction,'ngShow') : "";
|
||||
html += ">";
|
||||
html += (fAction.icon) ? this.attr(fAction, 'icon') : "";
|
||||
html += (fAction.label) ? list.fieldActions[action]['label'] : "";
|
||||
html += SelectIcon({ action: action });
|
||||
html += (fAction.label) ? " " + list.fieldActions[action]['label'] : "";
|
||||
html += "</a>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,10 +2,7 @@
|
||||
<div id="htmlTemplate">
|
||||
<div id="refresh-row" class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="list-actions pull-right">
|
||||
<button type="button" class="btn btn-primary btn-xs refresh-btn" ng-click="refresh()" id="refresh_btn" aw-tool-tip="Refresh page" data-placement="top"><i class="icon-refresh icon-large"></i></button>
|
||||
<button type="button" class="btn btn-primary btn-xs activity-btn" ng-click="showActivity()" id="activity_btn" aw-tool-tip="View activity stream" data-placement="top" ng-show="user_is_superuser"><i class="icon-comments-alt icon-large"></i></button>
|
||||
</div>
|
||||
<div id="home-list-actions" class="list-actions pull-right"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@ -214,7 +214,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button ng-click="systemLogin(login_username, login_password)" id="login-button" class="btn btn-primary"><i class="icon-signin"></i> Sign In</button>
|
||||
<button ng-click="systemLogin(login_username, login_password)" id="login-button" class="btn btn-primary"><i class="fa fa-sign-in"></i> Sign In</button>
|
||||
</div>
|
||||
</div><!-- modal-content -->
|
||||
</div><!-- modal-dialog -->
|
||||
@ -249,7 +249,7 @@
|
||||
<div class="modal-body" id="form-modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
<button ng-show="formModalInfo !== undefined && formModalInfo != ''" ng-click="formModalInfoAction()"
|
||||
class="btn btn-sm pull-left"><i class="icon-zoom-in"></i> <span ng-bind="formModalInfo"></span></button>
|
||||
class="btn btn-sm pull-left"><i class="fa fa-search-plus"></i> <span ng-bind="formModalInfo"></span></button>
|
||||
<a href="#" ng-show="formModalCancelShow" data-target="#form-modal" data-dismiss="modal" id="form_cancel_btn" class="btn btn-default">Cancel</a>
|
||||
<a href="" ng-bind="formModalActionLabel" ng-click="formModalAction()" ng-disabled="formModalActionDisabled" id="form_ok_btn" class="btn btn-primary"></a>
|
||||
</div>
|
||||
@ -268,7 +268,7 @@
|
||||
<div class="modal-body" id="form-modal2-body"></div>
|
||||
<div class="modal-footer">
|
||||
<a href="" ng-bind="formModal2Info" ng-show="formModal2Info !== undefined && formModal2Info != ''" ng-click="formModal2InfoAction()"
|
||||
class="btn btn-default btn-sm pull-left"><i class="icon-zoom-in"></i> <span ng-bind="formModal2Info"></span></a>
|
||||
class="btn btn-default btn-sm pull-left"><i class="fa fa-search-plus"></i> <span ng-bind="formModal2Info"></span></a>
|
||||
<a href="#" ng-show="formModal2CancelShow" data-target="#form-modal2" data-dismiss="modal" id="form2_cancel_btn"
|
||||
class="btn btn-default">Cancel</a>
|
||||
<a href="" ng-bind="formModal2ActionLabel" ng-click="formModal2Action()" id="form2_ok_btn" class="btn btn-primary"></a>
|
||||
@ -357,17 +357,23 @@
|
||||
</div><!-- container -->
|
||||
|
||||
<div class="overlay"></div>
|
||||
<div class="spinny"><i class="icon-cog icon-spin icon-2x"></i> <p>working...</p></div>
|
||||
<div class="spinny"><i class="fa fa-cog fa-spin fa-2x"></i> <p>working...</p></div>
|
||||
|
||||
<div class="site-footer">
|
||||
<div class="container">
|
||||
<div class="help pull-left">
|
||||
<a href="https://ansibleworks.zendesk.com/anonymous_requests/new" target="_blank"><i class="icon-question-sign"></i> Contact Support</a>
|
||||
</div>
|
||||
<div class="copyright"><a href="http://www.ansibleworks.com">Copyright © 2013 AnsibleWorks, Inc. All rights reserved.</a></div>
|
||||
<div class="logo pull-right">
|
||||
<a href="http://www.ansibleworks.com" target="_blank"><img src="{{ STATIC_URL }}img/AWX_logo.png" /></a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 text-left help">
|
||||
<a href="https://ansibleworks.zendesk.com/anonymous_requests/new" target="_blank"><i class="fa fa-question-circle"></i> Contact Support</a>
|
||||
</div>
|
||||
<div class="col-lg-6 text-center copyright">
|
||||
<a href="http://www.ansibleworks.com">Copyright © 2013 AnsibleWorks, Inc. All rights reserved.</a>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="logo">
|
||||
<a href="http://www.ansibleworks.com" target="_blank"><img src="{{ STATIC_URL }}img/AWX_logo.png" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- site footer -->
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user