|
6 | 6 | <title>Label Selector and Filter example</title> |
7 | 7 | <meta name="description" content=""> |
8 | 8 | <meta name="viewport" content="width=device-width"> |
9 | | - |
10 | | - <!-- example theme uses bootstrap --> |
11 | | - <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css" /> |
| 9 | + |
| 10 | + <!-- example theme uses patternfly --> |
| 11 | + <link rel="stylesheet" href="bower_components/patternfly/dist/css/patternfly.min.css" /> |
12 | 12 |
|
13 | 13 | <!-- build:css(.) styles/vendor.css --> |
14 | 14 | <!-- bower:css --> |
|
24 | 24 | </style> |
25 | 25 | </head> |
26 | 26 | <body ng-app="exampleApp"> |
27 | | - <div style="margin: 10px 10px 0; position:relative"> |
| 27 | + <div style="margin: 10px 10px 0; position: relative"> |
28 | 28 | <div class="filter"> |
29 | | - <div class="navbar-filter-widget"></div> |
| 29 | + <div class="navbar-filter-widget"></div> |
30 | 30 | </div> |
31 | 31 | <div class="active-filters"></div> |
32 | 32 | </div> |
|
56 | 56 | // LabelFilter.addLabelSuggestionsFromResources(resources, map); |
57 | 57 | // where map will get the new suggestions added to it |
58 | 58 | // |
59 | | - // Or you can just create some suggestions yourself (setting suggestions is not required, users have the option to |
| 59 | + // Or you can just create some suggestions yourself (setting suggestions is not required, users have the option to |
60 | 60 | // type in their own labels/values) |
61 | 61 | LabelFilter.setLabelSuggestions({ |
62 | 62 | label_1: [ |
|
85 | 85 | {value: "value-4-1"}, |
86 | 86 | {value: "value-4-2"}, |
87 | 87 | {value: "value-41212121212121-212121212121-21212121212-1212121212"} |
88 | | - ] |
| 88 | + ] |
89 | 89 | }); |
90 | 90 |
|
91 | 91 | // Do something when the active filters change |
|
94 | 94 | // If you have a set of k8s resources, you can filter them by running |
95 | 95 | // labelSelector.select(resources); |
96 | 96 | // which will return a map of resource name to resource for all resources selected by the label selector |
97 | | - // if you want to check specific resources yourself you can use |
| 97 | + // if you want to check specific resources yourself you can use |
98 | 98 | // labelSelector.match(resource); |
99 | 99 | // to return a boolean if that resource is matched by the selector |
100 | | - }); |
| 100 | + }); |
101 | 101 | }); |
102 | 102 | </script> |
103 | 103 | </body> |
|
0 commit comments