diff --git a/java/code/src/com/suse/manager/webui/Router.java b/java/code/src/com/suse/manager/webui/Router.java index 1ef001adad58..ffc0dd911478 100644 --- a/java/code/src/com/suse/manager/webui/Router.java +++ b/java/code/src/com/suse/manager/webui/Router.java @@ -59,10 +59,10 @@ import com.suse.manager.webui.controllers.SetController; import com.suse.manager.webui.controllers.SsmController; import com.suse.manager.webui.controllers.StatesAPI; +import com.suse.manager.webui.controllers.StorybookController; import com.suse.manager.webui.controllers.SubscriptionMatchingController; import com.suse.manager.webui.controllers.SystemsController; import com.suse.manager.webui.controllers.TaskoTop; -import com.suse.manager.webui.controllers.StorybookController; import com.suse.manager.webui.controllers.VirtualHostManagerController; import com.suse.manager.webui.controllers.activationkeys.ActivationKeysController; import com.suse.manager.webui.controllers.activationkeys.ActivationKeysViewsController; diff --git a/web/html/src/build/plugins/generate-stories-plugin.js b/web/html/src/build/plugins/generate-stories-plugin.js index fb36f2532d8a..425aeb6caa9f 100644 --- a/web/html/src/build/plugins/generate-stories-plugin.js +++ b/web/html/src/build/plugins/generate-stories-plugin.js @@ -1,9 +1,6 @@ const fs = require("fs").promises; const path = require("path"); -// eslint-disable-next-line no-unused-vars -const webpack = require("webpack"); - /** Automatically gather all imports for story files */ module.exports = class GenerateStoriesPlugin { didApply = false; @@ -17,7 +14,7 @@ module.exports = class GenerateStoriesPlugin { } /** - * @param {webpack.Compiler} compiler + * @param {import("webpack").Compiler} compiler */ apply(compiler) { // See https://webpack.js.org/api/compiler-hooks/#hooks @@ -31,7 +28,7 @@ module.exports = class GenerateStoriesPlugin { /** * - * @param {webpack.Compiler} compiler + * @param {import("webpack").Compiler} compiler * @param {Function} callback */ async beforeOrWatchRun(compiler, callback) { @@ -73,7 +70,7 @@ module.exports = class GenerateStoriesPlugin { }; const storyTemplate = (filePath, safeName, groupName) => -` + ` import ${safeName}_component from "${filePath}"; import ${safeName}_raw from "${filePath}?raw"; @@ -87,7 +84,7 @@ export const ${safeName} = { `; const fileTemplate = (content) => -` + ` /** * NB! This is a generated file! * Any changes you make here will be lost. diff --git a/web/html/src/components/input/check/Check.stories.tsx b/web/html/src/components/input/check/Check.stories.tsx index e31b1193b42e..f068ac33c6a4 100644 --- a/web/html/src/components/input/check/Check.stories.tsx +++ b/web/html/src/components/input/check/Check.stories.tsx @@ -11,7 +11,7 @@ export default () => { return (
console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" onChange={(newModel) => { diff --git a/web/html/src/components/input/datetime/DateTime.stories.tsx b/web/html/src/components/input/datetime/DateTime.stories.tsx index a69f2bfb31ea..23b560a8ec3e 100644 --- a/web/html/src/components/input/datetime/DateTime.stories.tsx +++ b/web/html/src/components/input/datetime/DateTime.stories.tsx @@ -17,7 +17,7 @@ export default () => { onChange={(newModel) => { model["time"] = newModel["time"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/form-multi-input/multiple-fields.stories.tsx b/web/html/src/components/input/form-multi-input/multiple-fields.stories.tsx index cd7108a2da26..4030c118784d 100644 --- a/web/html/src/components/input/form-multi-input/multiple-fields.stories.tsx +++ b/web/html/src/components/input/form-multi-input/multiple-fields.stories.tsx @@ -15,7 +15,7 @@ export default () => { console.log(result)} + onSubmit={(result) => Loggerhead.info(result)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/form-multi-input/single-field.stories.tsx b/web/html/src/components/input/form-multi-input/single-field.stories.tsx index 7678f7a9b158..2f0041252878 100644 --- a/web/html/src/components/input/form-multi-input/single-field.stories.tsx +++ b/web/html/src/components/input/form-multi-input/single-field.stories.tsx @@ -15,7 +15,7 @@ export default () => { console.log(result)} + onSubmit={(result) => Loggerhead.info(result)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/form-multi-input/table-fields.stories.tsx b/web/html/src/components/input/form-multi-input/table-fields.stories.tsx index 74a02869ab0a..10b05b508866 100644 --- a/web/html/src/components/input/form-multi-input/table-fields.stories.tsx +++ b/web/html/src/components/input/form-multi-input/table-fields.stories.tsx @@ -23,7 +23,7 @@ export default () => { console.log(result)} + onSubmit={(result) => Loggerhead.info(result)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/form/Form.stories.tsx b/web/html/src/components/input/form/Form.stories.tsx index cccfb3062ebb..2520173ba537 100644 --- a/web/html/src/components/input/form/Form.stories.tsx +++ b/web/html/src/components/input/form/Form.stories.tsx @@ -14,7 +14,7 @@ export default () => { onChange={(newModel) => { model["name"] = newModel["name"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/password/Password.stories.tsx b/web/html/src/components/input/password/Password.stories.tsx index 100572b5ba8e..58f9efe602c3 100644 --- a/web/html/src/components/input/password/Password.stories.tsx +++ b/web/html/src/components/input/password/Password.stories.tsx @@ -14,7 +14,7 @@ export default () => { onChange={(newModel) => { model["password"] = newModel["password"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/radio/horizontal-open.stories.tsx b/web/html/src/components/input/radio/horizontal-open.stories.tsx index 9f17b85fea8f..b7f8f992cf1f 100644 --- a/web/html/src/components/input/radio/horizontal-open.stories.tsx +++ b/web/html/src/components/input/radio/horizontal-open.stories.tsx @@ -16,7 +16,7 @@ export default () => { onChange={(newModel) => { model["level"] = newModel["level"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/radio/horizontal.stories.tsx b/web/html/src/components/input/radio/horizontal.stories.tsx index 839fa871c988..613bbf2e4a51 100644 --- a/web/html/src/components/input/radio/horizontal.stories.tsx +++ b/web/html/src/components/input/radio/horizontal.stories.tsx @@ -16,7 +16,7 @@ export default () => { onChange={(newModel) => { model["level"] = newModel["level"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/radio/vertical-open.stories.tsx b/web/html/src/components/input/radio/vertical-open.stories.tsx index ea6a60100586..7085db5166fd 100644 --- a/web/html/src/components/input/radio/vertical-open.stories.tsx +++ b/web/html/src/components/input/radio/vertical-open.stories.tsx @@ -16,7 +16,7 @@ export default () => { onChange={(newModel) => { model["level"] = newModel["level"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/radio/vertical.stories.tsx b/web/html/src/components/input/radio/vertical.stories.tsx index 54ce385323d2..10e7a64c94de 100644 --- a/web/html/src/components/input/radio/vertical.stories.tsx +++ b/web/html/src/components/input/radio/vertical.stories.tsx @@ -16,7 +16,7 @@ export default () => { onChange={(newModel) => { model["level"] = newModel["level"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/range/Range.stories.tsx b/web/html/src/components/input/range/Range.stories.tsx index 965fe6b25941..5a1cc28cc424 100644 --- a/web/html/src/components/input/range/Range.stories.tsx +++ b/web/html/src/components/input/range/Range.stories.tsx @@ -16,7 +16,7 @@ export default () => { model["port_start"] = newModel["port_start"]; model["port_end"] = newModel["port_end"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/select/async.stories.tsx b/web/html/src/components/input/select/async.stories.tsx index ca6d89637fd9..650195aeeead 100644 --- a/web/html/src/components/input/select/async.stories.tsx +++ b/web/html/src/components/input/select/async.stories.tsx @@ -34,7 +34,7 @@ export default () => { onChange={(newModel) => { model["level"] = newModel["level"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/select/custom.stories.tsx b/web/html/src/components/input/select/custom.stories.tsx index 24c62c432ff8..efcfa10031c5 100644 --- a/web/html/src/components/input/select/custom.stories.tsx +++ b/web/html/src/components/input/select/custom.stories.tsx @@ -23,7 +23,7 @@ export default () => { onChange={(newModel) => { model["flavor"] = newModel["flavor"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/select/simple.stories.tsx b/web/html/src/components/input/select/simple.stories.tsx index fa7a4ce79d57..ec95bb5dd748 100644 --- a/web/html/src/components/input/select/simple.stories.tsx +++ b/web/html/src/components/input/select/simple.stories.tsx @@ -17,7 +17,7 @@ export default () => { onChange={(newModel) => { model["level"] = newModel["level"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/components/input/text/Text.stories.tsx b/web/html/src/components/input/text/Text.stories.tsx index 38bd998cded0..22da144b50dd 100644 --- a/web/html/src/components/input/text/Text.stories.tsx +++ b/web/html/src/components/input/text/Text.stories.tsx @@ -14,7 +14,7 @@ export default () => { onChange={(newModel) => { model["firstname"] = newModel["firstname"]; }} - onSubmit={() => console.log(model)} + onSubmit={() => Loggerhead.info(model)} divClass="col-md-12" formDirection="form-horizontal" > diff --git a/web/html/src/manager/storybook/storybook.tsx b/web/html/src/manager/storybook/storybook.tsx index a11d3671c195..434405890504 100644 --- a/web/html/src/manager/storybook/storybook.tsx +++ b/web/html/src/manager/storybook/storybook.tsx @@ -89,22 +89,23 @@ export const Storybook = () => { {stories.map((group) => (
- {normalize(group.title) === activeTabHash && group.stories?.map((item) => ( - -

- {item.title} -

-
-
{item.component ? : null}
- {showCode ? ( -
-                    {item.raw}
-                  
- ) : null} -
-
-
- ))} + {normalize(group.title) === activeTabHash && + group.stories?.map((item) => ( + +

+ {item.title} +

+
+
{item.component ? : null}
+ {showCode ? ( +
+                      {item.raw}
+                    
+ ) : null} +
+
+
+ ))}
))} diff --git a/web/html/src/object.d.ts b/web/html/src/object.d.ts index 4ee9dac85b41..1608d5518e1f 100644 --- a/web/html/src/object.d.ts +++ b/web/html/src/object.d.ts @@ -6,8 +6,8 @@ interface ObjectConstructor { * @param keySelector A callback which will be invoked for each item in items. */ groupBy( - items: Iterable, - keySelector: (item: T, index: number) => K, + items: Iterable, + keySelector: (item: T, index: number) => K ): Partial>; } @@ -17,8 +17,5 @@ interface MapConstructor { * @param items An iterable. * @param keySelector A callback which will be invoked for each item in items. */ - groupBy( - items: Iterable, - keySelector: (item: T, index: number) => K, - ): Map; + groupBy(items: Iterable, keySelector: (item: T, index: number) => K): Map; }