Explorar o código

HUE-3529 [home2] Remaining documents icons

This also introduces the ko switch case binding
Johan Ahlen %!s(int64=9) %!d(string=hai) anos
pai
achega
be683b4

+ 11 - 0
desktop/core/src/desktop/static/desktop/js/ko.switch-case.js

@@ -0,0 +1,11 @@
+/*
+ SWITCH/CASE binding for Knockout http://knockoutjs.com/
+ (c) Michael Best
+ License: MIT (http://www.opensource.org/licenses/mit-license.php)
+ Version 2.1.0
+ */
+(function(b,k){"function"===typeof define&&define.amd?define(["knockout"],k):k(b.ko)})(this,function(b){function k(a,f){var c=m(f.$switchValueAccessor());return"boolean"==typeof c?a?c:!c:"boolean"==typeof a?a:a instanceof Array?-1!==b.utils.arrayIndexOf(a,c):a==c}function v(a,b){return!k(a,b)}function w(a){return function(){return a}}function h(a,f,c){var n=f?v:k;a||(a="if");c||(c=w);return{flags:d[a].flags,init:function(f,g,l,x,e){if(!e.$switchSkipNextArray)throw Error("case binding must only be used with a switch binding");
+  if(e.$switchIndex!==p)throw Error("case binding cannot be nested");e.$switchIndex=e.$switchSkipNextArray.push(b.observable(!1))-1;e.$caseValue=b.observable();b.computed(function(){var a=e.$switchIndex,b=a===e.$switchSkipNextArray.length-1,c,f,d;a&&e.$switchSkipNextArray[a-1]()?(c=!1,f=!0):(c=m(g()),c===e.$else?(c=e.$switchDefault()||b,f=!1):d=f=c=n(c,e));e.$caseValue(c);e.$switchSkipNextArray[a](f);d?e.$switchDefault(!1):!f&&b&&e.$switchDefault(!0)},null,{disposeWhenNodeIsRemoved:f});if(d[a].init)return d[a].init(f,
+      c(e.$caseValue),l,x,e)},update:function(b,f,g,n,e){if(d[a].update)return d[a].update(b,c(e.$caseValue),g,n,e)}}}function r(a,b,c){g.allowedBindings[a]&&(g.allowedBindings[c]=!0);return h(a,"casenot"===b)}function y(a,b,c){return r(b,a,c)}function s(a,b){d[a]=h("if",b);t[a]=!1;g.allowedBindings[a]=!0;d[a].makeSubkeyHandler=y;d[a].getNamespacedHandler=r}var p;if(!b.virtualElements)throw Error("Switch-case requires at least Knockout 2.1");var g=b.virtualElements,q=b.bindingFlags||{},t=b.bindingRewriteValidators||
+    b.jsonExpressionRewriting.bindingRewriteValidators,m=b.utils.unwrapObservable,d=b.bindingHandlers,u={};d["switch"]={flags:q.contentBind|q.canUseVirtual|q.noValue,init:function(a,f,c,d,k){var h={$switchSkipNextArray:[],$switchValueAccessor:f,$switchDefault:b.observable(!0),$default:u,$else:u},l=[];b.computed(function(){var a=m(f());h.$value=a;b.utils.arrayForEach(l,function(b){b.$value=a})},null,{disposeWhenNodeIsRemoved:a});for(c=g.firstChild(a);a=c;)switch(c=g.nextSibling(a),a.nodeType){case 1:case 8:d=
+    k.extend(h),d.$switchIndex=p,b.applyBindings(d,a),d.$switchIndex!==p&&l.push(d)}return{controlsDescendantBindings:!0}},preprocess:function(a){return a||"true"}};t["switch"]=!1;g.allowedBindings["switch"]=!0;s("case");s("casenot",!0);d["case.visible"]=h("visible");d["casenot.visible"]=h("visible",!0);d["switch"].makeCaseHandler=h});

+ 32 - 5
desktop/core/src/desktop/templates/file_browser.mako

@@ -576,18 +576,44 @@ from desktop.views import _ko
               </ul>
               <div class="fb-primary-col">
                 <svg class="hi">
-                  <!-- ko if: isDirectory() -->
+                  <!-- ko if: isDirectory -->
                   <use xlink:href="#hi-folder"></use>
                   <!-- /ko -->
-                  <!-- ko if: ! isDirectory() && definition().type === 'query-hive' -->
+                  <!-- ko ifnot: isDirectory -->
+                  <!-- ko switch: definition().type -->
+                  <!-- ko case: 'query-hive' -->
                   <use xlink:href="#hi-file-hive"></use>
                   <!-- /ko -->
-                  <!-- ko if: ! isDirectory() && definition().type === 'query-impala' -->
+                  <!-- ko case: 'query-impala' -->
                   <use xlink:href="#hi-file-impala"></use>
                   <!-- /ko -->
-                  <!-- ko if: ! isDirectory() && definition().type !== 'query-impala' && definition().type !== 'query-hive' -->
+                  <!-- ko case: 'link-workflow' -->
+                  <use xlink:href="#hi-file-job-designer"></use>
+                  <!-- /ko -->
+                  <!-- ko case: 'notebook' -->
+                  <use xlink:href="#hi-file-notebook"></use>
+                  <!-- /ko -->
+                  <!-- ko case: 'oozie-bundle2' -->
+                  <use xlink:href="#hi-file-oozie-bundle"></use>
+                  <!-- /ko -->
+                  <!-- ko case: 'oozie-coordinator2' -->
+                  <use xlink:href="#hi-file-oozie-coordinator"></use>
+                  <!-- /ko -->
+                  <!-- ko case: 'oozie-workflow2' -->
+                  <use xlink:href="#hi-file-oozie-workflow"></use>
+                  <!-- /ko -->
+                  <!-- ko case: 'link-pigscript' -->
+                  <use xlink:href="#hi-file-pig"></use>
+                  <!-- /ko -->
+                  <!-- ko case: 'search-dashboard' -->
+                  <use xlink:href="#hi-file-search"></use>
+                  <!-- /ko -->
+                  <!-- ko case: $default -->
                   <use xlink:href="#hi-file"></use>
                   <!-- /ko -->
+                  <!-- /ko -->
+                  <!-- /ko -->
+
                   <!-- ko if: (isShared() || isSharedWithMe()) && selected() -->
                   <use xlink:href="#hi-share-addon-selected"></use>
                   <!-- /ko -->
@@ -617,7 +643,8 @@ from desktop.views import _ko
     (function (factory) {
       if(typeof require === "function") {
         define('fileBrowser', [
-          'knockout'
+          'knockout',
+          'ko.switch-case'
         ], factory);
       } else {
         factory(ko);

+ 52 - 7
desktop/core/src/desktop/templates/hue_icons.mako

@@ -16,13 +16,11 @@
 
 <%def name="symbols()">
   <svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="display:none;">
-    <symbol id="hi-warning" viewBox="-0.002 0 512.001 449.468">
-      <path d="M507.747,413.145L275.868,11.503C271.763,4.392,264.163,0,255.947,0c-8.229,0-15.816,4.392-19.923,11.503L3.09,414.959   c-4.123,7.117-4.123,15.901,0,23.006c4.106,7.117,11.694,11.503,19.922,11.503h465.869c0.045,0,0.084,0,0.112,0   c12.71,0,23.006-10.301,23.006-23.006C511.999,421.503,510.426,416.908,507.747,413.145z M62.857,403.462l193.09-334.444   l193.078,334.438H62.857V403.462z" />
-      <path d="M232.941,171.853V274.48c0,12.705,10.301,23.006,23.006,23.006s23.006-10.301,23.006-23.006V171.853   c0-12.705-10.301-23.006-23.006-23.006S232.941,159.148,232.941,171.853z"/>
-      <path d="M255.918,317.813c-7.543,0-14.963,3.044-20.305,8.402c-5.347,5.353-8.452,12.767-8.452,20.355   c0,7.543,3.105,14.957,8.452,20.298c5.354,5.358,12.772,8.459,20.305,8.459c7.583,0,15.002-3.101,20.36-8.459   c5.348-5.353,8.453-12.767,8.453-20.298c0-7.589-3.105-15.003-8.453-20.355C270.926,320.863,263.506,317.813,255.918,317.813z"/>
+    <symbol id="hi-file" viewBox="0 0 640 640">
+      <path d="M574.3,143.67L445.74,12.32A41.24,41.24,0,0,0,416.44,0H95A41,41,0,0,0,54,41V599a41,41,0,0,0,41,41H545a41,41,0,0,0,41-41V172.35A40.78,40.78,0,0,0,574.3,143.67ZM422.87,34.7L551.43,166a9,9,0,0,1,2.57,6.3V181H413.51a8.19,8.19,0,0,1-8.51-8.51V32h11.44A9.05,9.05,0,0,1,422.87,34.7ZM545,608H95a9,9,0,0,1-9-9V41a9,9,0,0,1,9-9H373V172.49A40.21,40.21,0,0,0,413.51,213H554V599A9,9,0,0,1,545,608Z"/>
     </symbol>
 
-    <symbol class="hi" id="hi-file-hive" viewBox="0 0 640 640">
+    <symbol id="hi-file-hive" viewBox="0 0 640 640">
       <path d="M488.17,380.68c10.67-3.25,11-6,14.64-8.84l-9.15,4.45c-14.89,4.7-15.78.51-21.34-1.08C476,379.4,480.38,382.52,488.17,380.68Z"/>
       <path d="M385.48,415c-4.89,3.48-5.63,6.8-5.52,9.69,8.13-8,7.82-8,19.69-7.94C398.2,416.22,385.48,414.58,385.48,415Z"/>
       <path d="M347.84,249.46c-15.18-4.87-37.52-3.75-57.72-4.42,17.4,4.43,43.18,4.54,55.74,12.31,0.19,0.68-.32,1.13-1.08,1.5-10.82-2.77-18.51,3.94-23,6.21,12.48-2.54,16,.44,25.46,1.24,10.26,3.92,16.29,22.76,23.06,28.08C364,280.69,360,260.29,347.84,249.46Z"/>
@@ -39,8 +37,49 @@
       <path d="M574.24,143.67L445.65,12.32A41.31,41.31,0,0,0,416.32,0H94.88A41,41,0,0,0,54,41V599a41,41,0,0,0,40.88,41h450A41.15,41.15,0,0,0,586,599V172.35A40.83,40.83,0,0,0,574.24,143.67ZM554,599a9.11,9.11,0,0,1-9.12,9h-450A8.91,8.91,0,0,1,86,599V41a8.91,8.91,0,0,1,8.88-9H373V91.23A165.33,165.33,0,0,0,360.58,78.1c4.72,7.55,8.84,14.83,12.42,21.9v72.49a40.21,40.21,0,0,0,20.05,35.12c-0.09,1-.17,1.93-0.27,2.9-1.52,15.33-3.38,28.09-5.42,30-18.72,14.76-35.12,39.83-43.94,56.21-12.29,21.69-12.93,47.4,1.93,68.88,2,3,3.64,6.33,5.49,9.48,5.31,9,7.32,22.28-1.58,35-18.34,26.22-19.94,49.75-15.11,80.83,1,6.36.93,10.75,1.83,15.41,0.27,1.38-1.39,2.15-4.57,5.22-3.71,3.58-6.92,12-13.57,5-3-3.57-10.63-10.43-11.9-9.67-0.9,9.19,4.42,11,9.71,13.77,5.6,2.89,8.65,7.62,7.36,14.13-1.17,5.93-5.77,6.72-10.84,6.47-0.83,0-7.13-1.46-6.32,0,5.29,2.17,10,4.83,16.82,5.62,1.27,5.41,2.75,8.65-.15,15.21,14-4.51,22.65-11.82,27.58-23.66,14.45-32.32,19.49-77.77,21.35-112.63,0.36-6.8,5-6.32,6.66-10.1,1.41-3.19,1.21-8.92,5.11-10.12,3.57-1.1,2.53-.85,7.1-3.53-15.44-10.72-16.39-21.26-3.07-35.49,2.49-2.66,5-5.64,8.1-7.31,21.71-11.65,30.12-49,25.46-75.77-12.15,16.26-18,26.83-26.21,37.2a273.67,273.67,0,0,1-22.23,24.68c-2.09,2.11-6.95,3.19-9.74,2.28-1.89-.61-3.83-5.83-3.26-8.44,2.1-9.58,4.07-19.47,8.21-28.25,9.6-20.35,25.06-36.38,41.14-51.81,2.43-2.33,3.87-2.5,4.55-5.75A199.36,199.36,0,0,0,417.42,213H554V599Zm0-418H413.39a8.1,8.1,0,0,1-8.39-8.51V32h11.32a9.05,9.05,0,0,1,6.43,2.7L551.37,166a9,9,0,0,1,2.63,6.3V181Z"/>
     </symbol>
 
-    <symbol id="hi-file" viewBox="0 0 640 640">
-      <path d="M574.3,143.67L445.74,12.32A41.24,41.24,0,0,0,416.44,0H95A41,41,0,0,0,54,41V599a41,41,0,0,0,41,41H545a41,41,0,0,0,41-41V172.35A40.78,40.78,0,0,0,574.3,143.67ZM422.87,34.7L551.43,166a9,9,0,0,1,2.57,6.3V181H413.51a8.19,8.19,0,0,1-8.51-8.51V32h11.44A9.05,9.05,0,0,1,422.87,34.7ZM545,608H95a9,9,0,0,1-9-9V41a9,9,0,0,1,9-9H373V172.49A40.21,40.21,0,0,0,413.51,213H554V599A9,9,0,0,1,545,608Z"/>
+    <symbol id="hi-file-job-designer" viewBox="0 0 640 640">
+      <path d="M556.4,150.5L427.9,18.8C420.3,10.9,409.7,6,398.7,6H77.3C54.7,6,36,25.3,36,47.9v558C36,628.5,54.7,646,77.3,646h450c22.6,0,40.7-17.5,40.7-40.1V179.2A40.6,40.6,0,0,0,556.4,150.5ZM405.2,41.1L533.6,172.7a9.3,9.3,0,0,1,2.4,6.5V187H395.8c-5,0-8.8-2.7-8.8-7.6V38h11.7A9.5,9.5,0,0,1,405.2,41.1ZM527.3,614H77.3c-5,0-9.3-3.2-9.3-8.1V47.9c0-5,4.3-9.9,9.3-9.9H355V179.4c0,22.6,18.2,39.6,40.8,39.6H536V605.9C536,610.8,532.2,614,527.3,614Z"/>
+      <path d="M455,249.5L443.5,261A180.2,180.2,0,0,0,190,514.5L178.5,526a5,5,0,0,0,0,7.1l26.6,26.6a5,5,0,0,0,7.1,0L488.7,283.2a5,5,0,0,0,0-7.1l-26.6-26.6A5,5,0,0,0,455,249.5ZM184,453.2l28.2-7.6a5,5,0,0,0,3.6-6.2l-3.9-14.6a5,5,0,0,0-6.2-3.6l-28.2,7.5a157,157,0,0,1,0-55.6l28.2,7.5a5,5,0,0,0,6.2-3.6l3.9-14.6a5,5,0,0,0-3.6-6.2L184,348.8a153.8,153.8,0,0,1,27.7-47.9l20.7,20.7a5,5,0,0,0,7.1,0l10.7-10.7a5,5,0,0,0,0-7.1L229.5,283A153.8,153.8,0,0,1,277.8,255l7.6,28.2a5,5,0,0,0,6.2,3.6l14.6-3.9a5,5,0,0,0,3.6-6.2l-7.5-28.2a157,157,0,0,1,55.6,0l-7.5,28.2a5,5,0,0,0,3.6,6.2l14.6,3.9a5,5,0,0,0,6.2-3.6l7.6-28.2a153.6,153.6,0,0,1,43.4,24L208,496.5A153.6,153.6,0,0,1,184,453.2Z"/>
+    </symbol>
+
+    <symbol id="hi-file-notebook" viewBox="0 0 640 640">
+      <path d="M574.3,143.7L445.7,12.3A41.2,41.2,0,0,0,416.4,0H95A41,41,0,0,0,54,41V599a41,41,0,0,0,41,41H545a41,41,0,0,0,41-41V172.3A40.8,40.8,0,0,0,574.3,143.7ZM422.9,34.7L551.4,166a8.9,8.9,0,0,1,2.6,6.3V181H413.5a8.2,8.2,0,0,1-8.5-8.5V32h11.4A9.1,9.1,0,0,1,422.9,34.7ZM545,608H95a9,9,0,0,1-9-9V41a9,9,0,0,1,9-9H373V172.5A40.2,40.2,0,0,0,413.5,213H554V599A9,9,0,0,1,545,608Z"/>
+      <rect x="153" y="247" width="328" height="34" rx="4" ry="4"/>
+      <rect x="153" y="328" width="328" height="34" rx="4" ry="4"/>
+      <rect x="153" y="409" width="328" height="34" rx="4" ry="4"/>
+      <rect x="153" y="490" width="328" height="34" rx="4" ry="4"/>
+    </symbol>
+
+    <symbol id="hi-file-oozie-bundle" viewBox="0 0 640 640">
+      <path d="M574.5,144.1L446,12.5A41.3,41.3,0,0,0,416.8,0H95.3C72.7,0,54,18.8,54,41.4v558C54,622,72.7,640,95.3,640h450A40.4,40.4,0,0,0,586,599.4V172.8A40.6,40.6,0,0,0,574.5,144.1ZM423.2,34.9L551.6,166.4a9.1,9.1,0,0,1,2.4,6.4V181H413.9c-5,0-8.9-3.1-8.9-8.1V32h11.8A9.3,9.3,0,0,1,423.2,34.9ZM545.3,608H95.3c-5,0-9.3-3.6-9.3-8.6V41.4A9.7,9.7,0,0,1,95.3,32H373V172.9c0,22.6,18.2,40.1,40.9,40.1H554V599.4A8.4,8.4,0,0,1,545.3,608Z"/>
+      <path d="M320,546.8c-92.8,0-168.3-75.5-168.3-168.3S227.2,210.1,320,210.1s168.3,75.5,168.3,168.3S412.8,546.8,320,546.8Zm0-304.6c-75.2,0-136.3,61.2-136.3,136.3S244.8,514.8,320,514.8s136.3-61.2,136.3-136.3S395.2,242.1,320,242.1Z"/>
+      <path d="M265.9,286.5h28.3c-0.2-.4,0,65.5,0,65.5s12.6-20.1,38.7-20.1c44.2,0,60,36,60,68.2,0,39.4-21,67-55.3,67S292.6,446,292.6,446v17.6H265.9V286.5Zm98.7,113.1c0-32.1-18.8-45.4-35.5-45.4-32.4,0-36,31.7-36,45.4,0,23.9,11.4,45.1,36,45.1C363.3,444.8,364.6,405.2,364.6,399.6Z"/>
+    </symbol>
+
+    <symbol id="hi-file-oozie-coordinator" viewBox="0 0 640 640">
+      <path d="M574.5,143.7L446,12.3A41,41,0,0,0,416.8,0H95.3C72.7,0,54,18.4,54,41V599c0,22.6,18.7,41,41.3,41h450A40.8,40.8,0,0,0,586,599V172.3A40.6,40.6,0,0,0,574.5,143.7ZM423.2,34.7L551.6,166a8.8,8.8,0,0,1,2.4,6.3V181H413.9c-5,0-8.9-3.5-8.9-8.5V32h11.8A9.1,9.1,0,0,1,423.2,34.7ZM545.3,608H95.3a9.3,9.3,0,0,1-9.3-9V41a9.3,9.3,0,0,1,9.3-9H373V172.5A40.5,40.5,0,0,0,413.9,213H554V599A8.7,8.7,0,0,1,545.3,608Z"/>
+      <path d="M320,546.3c-92.8,0-168.3-75.5-168.3-168.3S227.2,209.7,320,209.7,488.3,285.2,488.3,378,412.8,546.3,320,546.3Zm0-304.6c-75.2,0-136.3,61.2-136.3,136.3S244.8,514.3,320,514.3,456.3,453.2,456.3,378,395.2,241.7,320,241.7Z"/>
+      <path d="M352.5,359.8c-1.2-7.9-6.6-24.1-29.3-24.1-25.1,0-35.2,20.6-35.2,46.6,0,5.3,1.3,43.9,34,43.9,23.3,0,29.2-20,30.5-29.3h28.3c-2.9,22.9-18,51.6-58.8,51.6-45.5,0-62.2-35-62.2-66.2s14.7-68.9,63.2-68.9c43,0,57.8,29.4,57.8,46.4H352.5Z"/>
+    </symbol>
+
+    <symbol id="hi-file-oozie-workflow" viewBox="0 0 640 640">
+      <path d="M574.5,143.7L446,12.3A41,41,0,0,0,416.8,0H95.3C72.7,0,54,18.4,54,41V599c0,22.6,18.7,41,41.3,41h450A40.8,40.8,0,0,0,586,599V172.3A40.6,40.6,0,0,0,574.5,143.7ZM423.2,34.7L551.6,166a8.8,8.8,0,0,1,2.4,6.3V181H413.9c-5,0-8.9-3.5-8.9-8.5V32h11.8A9.1,9.1,0,0,1,423.2,34.7ZM545.3,608H95.3a9.3,9.3,0,0,1-9.3-9V41a9.3,9.3,0,0,1,9.3-9H373V172.5A40.5,40.5,0,0,0,413.9,213H554V599A8.7,8.7,0,0,1,545.3,608Z"/>
+      <path d="M320,546.3c-92.8,0-168.3-75.5-168.3-168.3S227.2,209.7,320,209.7,488.3,285.2,488.3,378,412.8,546.3,320,546.3Zm0-304.6c-75.2,0-136.3,61.2-136.3,136.3S244.8,514.3,320,514.3,456.3,453.2,456.3,378,395.2,241.7,320,241.7Z"/>
+      <path d="M226.8,320.9h30l25,95.7h0.5l24.1-95.7h28.5l23.1,95.7h0.5l26-95.7h28.8L373.1,449.2h-29l-23.8-95.2h-0.5l-23.6,95.2H266.4Z"/>
+    </symbol>
+
+    <symbol id="hi-file-pig" viewBox="0 0 640 640">
+      <path d="M574.3,143.7L445.7,12.3A41.2,41.2,0,0,0,416.4,0H95A41,41,0,0,0,54,41V599a41,41,0,0,0,41,41H545a41,41,0,0,0,41-41V172.3A40.8,40.8,0,0,0,574.3,143.7Zm-347.5,170a20.8,20.8,0,0,0,28.1-22.8l-7.8-46.3a185,185,0,0,1,145.7,0l-7.8,46.3a20.8,20.8,0,0,0,28.1,22.8l45.6-18c18.2,24,28.8,52.9,28.8,84,0,82.8-75.2,150.1-167.5,150.1S152.5,462.5,152.5,379.7c0-31.1,10.6-60,28.8-84Zm-80-58.7,66.3-60.3,15.5,92.6Zm264.5,32.2L423.8,213h23.3l46.1,41.9ZM554,599a9,9,0,0,1-9,9H95a9,9,0,0,1-9-9V41a9,9,0,0,1,9-9H373V172.5a40.2,40.2,0,0,0,25.6,37.7l-1.4,8.6a211.9,211.9,0,0,0-154.3,0l-6.1-36.6a20.8,20.8,0,0,0-34.5-11.9l-77.8,70.8a20.8,20.8,0,0,0,6.4,34.7l26.1,10.3A170.2,170.2,0,0,0,142.5,311a161.4,161.4,0,0,0,0,137.4,174.9,174.9,0,0,0,41.6,55.7c36.4,32.8,84.6,50.9,135.9,50.9s99.5-18.1,135.9-50.9a174.9,174.9,0,0,0,41.6-55.7,161.4,161.4,0,0,0,0-137.4,170.2,170.2,0,0,0-14.4-24.9l26.1-10.3a20.8,20.8,0,0,0,6.4-34.7L484.7,213H554V599Zm0-418H413.5a8.2,8.2,0,0,1-8.5-8.5V32h11.4a9.1,9.1,0,0,1,6.4,2.7L551.4,166a8.9,8.9,0,0,1,2.6,6.3V181Z"/>
+      <path d="M247.7,379.4a18.1,18.1,0,1,0-18.1-18.1A18.1,18.1,0,0,0,247.7,379.4Z"/>
+      <path d="M392.3,379.4a18.1,18.1,0,1,0-18.1-18.1A18.1,18.1,0,0,0,392.3,379.4Z"/>
+      <path d="M251.6,479.5c18.4,11.1,42.7,17.1,68.4,17.1s50-6.1,68.4-17.1,30.8-28.2,30.8-45.9-10.9-34-30.8-45.9-42.7-17.1-68.4-17.1-50,6.1-68.4,17.1-30.8,28.2-30.8,45.9S231.7,467.6,251.6,479.5ZM320,388.3c44.1,0,81.4,20.7,81.4,45.3s-37.3,45.3-81.4,45.3-81.4-20.7-81.4-45.3S275.9,388.3,320,388.3Z"/>
+      <path d="M292.9,451.7c5,0,9-8.1,9-18.1s-4-18.1-9-18.1-9,8.1-9,18.1S287.9,451.7,292.9,451.7Z"/>
+      <path d="M347.1,451.7c5,0,9-8.1,9-18.1s-4-18.1-9-18.1-9,8.1-9,18.1S342.1,451.7,347.1,451.7Z"/>
+    </symbol>
+
+    <symbol id="hi-file-search" viewBox="0 0 640 640">
+      <path d="M574.3,143.7L445.7,12.3A41.2,41.2,0,0,0,416.4,0H95A41,41,0,0,0,54,41V599a41,41,0,0,0,41,41H545a41,41,0,0,0,41-41V172.3A40.8,40.8,0,0,0,574.3,143.7ZM422.9,34.7L551.4,166a8.9,8.9,0,0,1,2.6,6.3V181H413.5a8.2,8.2,0,0,1-8.5-8.5V32h11.4A9.1,9.1,0,0,1,422.9,34.7ZM545,608H95a9,9,0,0,1-9-9V41a9,9,0,0,1,9-9H373V172.5A40.2,40.2,0,0,0,413.5,213H554V599A9,9,0,0,1,545,608Z"/>
+      <path d="M470.2,480l-56.3-56.3a134,134,0,0,0,25.7-82.1c-1.6-71.8-59.9-130.2-131.7-131.7-76.7-1.7-139.4,61-137.7,137.7,1.6,72,60.3,130.4,132.3,131.7a134,134,0,0,0,82.5-26.5l56.2,56.2a13.7,13.7,0,0,0,19.3,0l9.7-9.7A13.7,13.7,0,0,0,470.2,480ZM305,448.3A103.8,103.8,0,1,1,408.7,344.5,103.9,103.9,0,0,1,305,448.3Z"/>
     </symbol>
 
     <symbol id="hi-folder" viewBox="0 0 640 640">
@@ -58,5 +97,11 @@
       <circle cx="517.32" cy="447.4" r="57.42"/>
       <path d="M591.71,637H442.94c-43.88,0-45.44-25.47-45.44-39.08,0-23.9,5.68-47.56,7.49-53.24s12.5-42.75,51.4-42.75c1,0,3.58.94,7.15,3.64,24.32,18.36,46.19,20,53.79,20s26.36-.57,53.78-20c3.65-2.59,6.13-3.67,7.15-3.67,39.14,0,49.59,37.22,51.41,42.89s7.48,33.9,7.48,53.15C637.15,611.53,632.73,637,591.71,637Z"/>
     </symbol>
+
+    <symbol id="hi-warning" viewBox="-0.002 0 512.001 449.468">
+      <path d="M507.747,413.145L275.868,11.503C271.763,4.392,264.163,0,255.947,0c-8.229,0-15.816,4.392-19.923,11.503L3.09,414.959   c-4.123,7.117-4.123,15.901,0,23.006c4.106,7.117,11.694,11.503,19.922,11.503h465.869c0.045,0,0.084,0,0.112,0   c12.71,0,23.006-10.301,23.006-23.006C511.999,421.503,510.426,416.908,507.747,413.145z M62.857,403.462l193.09-334.444   l193.078,334.438H62.857V403.462z" />
+      <path d="M232.941,171.853V274.48c0,12.705,10.301,23.006,23.006,23.006s23.006-10.301,23.006-23.006V171.853   c0-12.705-10.301-23.006-23.006-23.006S232.941,159.148,232.941,171.853z"/>
+      <path d="M255.918,317.813c-7.543,0-14.963,3.044-20.305,8.402c-5.347,5.353-8.452,12.767-8.452,20.355   c0,7.543,3.105,14.957,8.452,20.298c5.354,5.358,12.772,8.459,20.305,8.459c7.583,0,15.002-3.101,20.36-8.459   c5.348-5.353,8.453-12.767,8.453-20.298c0-7.589-3.105-15.003-8.453-20.355C270.926,320.863,263.506,317.813,255.918,317.813z"/>
+    </symbol>
   </svg>
 </%def>

+ 2 - 0
desktop/core/src/desktop/templates/require.mako

@@ -40,6 +40,7 @@ DEBUG = DJANGO_DEBUG_MODE.get()
         "knockout-mapping" : "desktop/ext/js/knockout-mapping.min",
         "knockout-sortable" : "desktop/ext/js/knockout-sortable.min",
         "ko.editable" : "desktop/js/ko.editable",
+        "ko.switch-case" : "desktop/js/ko.switch-case",
         "ko.hue-bindings" : "desktop/js/ko.hue-bindings"
       },
       shim: {
@@ -47,6 +48,7 @@ DEBUG = DJANGO_DEBUG_MODE.get()
         "knockout-mapping": { deps: ["knockout"] },
         "knockout-sortable": { deps: ["knockout", "jquery", "jquery.ui.sortable"] },
         "ko.editable": { deps: ["knockout"] },
+        "ko.switch-case": { deps: ["knockout"] },
         "ace.extended": { deps: ["ace"] },
         "ace.ext-language-tools": { deps: ["ace"] }
       },