Skip to content

Commit 6b294ab

Browse files
authored
Merge pull request #23 from IBM-Security/v24.09-assets
IAG v24.09 release updates
2 parents a5ff0e1 + 8572181 commit 6b294ab

File tree

139 files changed

+1398
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+1398
-209
lines changed

config-ui/generator/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
<dependency>
2323
<groupId>com.fasterxml.jackson.core</groupId>
2424
<artifactId>jackson-databind</artifactId>
25-
<version>2.12.1</version>
25+
<version>2.17.2</version>
2626
</dependency>
2727
<dependency>
2828
<groupId>com.fasterxml.jackson.dataformat</groupId>
2929
<artifactId>jackson-dataformat-yaml</artifactId>
30-
<version>2.12.1</version>
30+
<version>2.17.2</version>
3131
</dependency>
3232
</dependencies>
3333

config-ui/generator/src/com/ibm/iag/ui/Component.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,11 +1854,11 @@ else if(!objectName.trim().isEmpty() && !pathName.trim().isEmpty())
18541854
private void addGlobalEntries(String pageName, String name)
18551855
{
18561856
// Add the route for this new page
1857-
String route = Constants.ROUTE_TEMPLATE.replaceAll(Constants.ROUTE_MACRO, name).replaceAll(Constants.COMP_MACRO, pageName);
1857+
String route = Constants.ROUTE_TEMPLATE.replaceAll(Constants.ROUTE_MACRO, name).replaceAll(Constants.COMP_MACRO, Constants.toUpperCasename(pageName));
18581858
_routes.add(route);
18591859

18601860
// Add the import for this new page
1861-
String importStr = Constants.IMPORT_TEMPLATE.replaceAll(Constants.IMP_MACRO, pageName).replaceAll(Constants.FROM_MACRO, pageName);
1861+
String importStr = Constants.IMPORT_TEMPLATE.replaceAll(Constants.IMP_MACRO, Constants.toUpperCasename(pageName)).replaceAll(Constants.FROM_MACRO, pageName);
18621862
_imports.add(importStr);
18631863

18641864
// Update the header menu with a link to this new page

config-ui/generator/src/com/ibm/iag/ui/Constants.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static String toUpperCasename(String input)
5656
public static String ROUTES_MACRO = "<ADD_ROUTES_HERE>";
5757
public static String ROUTE_MACRO = "<ADD_ROUTE>";
5858
public static String COMP_MACRO = "<ADD_COMPONENT>";
59-
public static String ROUTE_TEMPLATE = "<Route path=\"/" + ROUTE_MACRO + "\" component= {" + COMP_MACRO + "} />";
59+
public static String ROUTE_TEMPLATE = "{ path: \"/" + ROUTE_MACRO + "\", element: <" + COMP_MACRO + " /> },";
6060
public static String IMPORT_MACRO = "<ADD_IMPORTS_HERE>";
6161
public static String IMP_MACRO = "<ADD_IMPORT>";
6262
public static String FROM_MACRO = "<ADD_FROM>";
@@ -79,6 +79,7 @@ public static String toUpperCasename(String input)
7979
public static String ADD_SCHEMA_HERE = "<ADD_SCHEMA_HERE>";
8080

8181
// Component page constants
82+
public static String COMPONENT_MACRO = "<COMPONENT_MACRO>";
8283
public static String PAGENAME_MACRO = "<PAGENAME_MACRO>";
8384
public static String PAGECONTENT_MACRO = "<PAGECONTENT_MACRO>";
8485
public static String PAGECONTENT_INDENT = " ";
@@ -584,8 +585,8 @@ public static String toUpperCasename(String input)
584585
public static String SELECT_ITEM = " <SelectItem text=\"" + SELECT_TEXT + "\" value=\"" + SELECT_VALUE + "\" />";
585586

586587
// Templates for tooltip widgets
587-
public static String TOOLTIP_FIELDS = " onFocus={(e) => ReactTooltip.show(e.target)} onBlur={(e) => ReactTooltip.hide(e.target)} data-tip data-for={\"" + ADD_NAME + "_tooltip_id\" + idPrefix} ";
588-
public static String TOOLTIP = " <ReactTooltip id={\"" + ADD_NAME + "_tooltip_id\" + idPrefix} place=\"top\" effect=\"solid\" " + ADD_TT_DELAY + "><div style={{ maxWidth: " + ADD_TT_WIDTH + " }}>" + ADD_TT_TEXT + "</div></ReactTooltip>\n";
588+
public static String TOOLTIP_FIELDS = " data-tooltip-id={\"" + ADD_NAME + "_tooltip_id\" + idPrefix} ";
589+
public static String TOOLTIP = " <ReactTooltip id={\"" + ADD_NAME + "_tooltip_id\" + idPrefix} clickable={true} place=\"top\" effect=\"solid\" " + ADD_TT_DELAY + "><div style={{ maxWidth: " + ADD_TT_WIDTH + " }}>" + ADD_TT_TEXT + "</div></ReactTooltip>\n";
589590

590591
// Template for grid update html code
591592
public static String GRID_UPDATE_HTML = " <Suspense fallback={<div></div>}>\n" +
@@ -678,7 +679,7 @@ public static String toUpperCasename(String input)
678679
" SelectItem,\n" +
679680
" Checkbox,\n" +
680681
"} from 'carbon-components-react';\n" +
681-
"import ReactTooltip from \"react-tooltip\";\n" +
682+
"import { Tooltip as ReactTooltip } from \"react-tooltip\";\n" +
682683
"\n" +
683684
"import { safeLoad, getDivHeight, jsonToYaml, updateStyle, updateStyle2, validateField, toggleDescription } from '../../helpers';" +
684685
"\n\n" +
@@ -784,7 +785,7 @@ public static String toUpperCasename(String input)
784785
" TableToolbar,\n" +
785786
" TableToolbarContent,\n" +
786787
"} from 'carbon-components-react';\n" +
787-
"import ReactTooltip from \"react-tooltip\";\n" +
788+
"import { Tooltip as ReactTooltip } from \"react-tooltip\";\n" +
788789
"\n" +
789790
"import { safeLoad, getDivHeight, jsonToYaml, updateStyle, updateStyle2, validateField, toggleDescription } from '../../helpers';" +
790791
"\n\n" +
@@ -1067,7 +1068,7 @@ public static String toUpperCasename(String input)
10671068
"import Collapsible from 'react-collapsible';" +
10681069
"\n" +
10691070
"import { Tabs, Tab, TabPanel, TabList } from 'react-web-tabs';\n" +
1070-
"import ReactTooltip from \"react-tooltip\";\n" +
1071+
"import { Tooltip as ReactTooltip } from \"react-tooltip\";\n" +
10711072
"\n" +
10721073
"import { safeLoad, getDivHeight, jsonToYaml, updateStyle, updateStyle2, validateField, toggleDescription } from '../../helpers';\n" +
10731074
"\n\n" +
@@ -1181,7 +1182,7 @@ public static String toUpperCasename(String input)
11811182
"import Collapsible from 'react-collapsible';" +
11821183
"\n" +
11831184
"import { Tabs, Tab, TabPanel, TabList } from 'react-web-tabs';\n" +
1184-
"import ReactTooltip from \"react-tooltip\";\n" +
1185+
"import { Tooltip as ReactTooltip } from \"react-tooltip\";\n" +
11851186
"\n" +
11861187
"import { safeLoad, getDivHeight, jsonToYaml, updateStyle, updateStyle2, editProps, validateField, toggleDescription } from '../../helpers';\n" +
11871188
"\n\n" +
@@ -1463,7 +1464,7 @@ public static String toUpperCasename(String input)
14631464
"import Collapsible from 'react-collapsible';" +
14641465
"\n" +
14651466
"import { Tabs, Tab, TabPanel, TabList } from 'react-web-tabs';\n" +
1466-
"import ReactTooltip from \"react-tooltip\";\n" +
1467+
"import { Tooltip as ReactTooltip } from \"react-tooltip\";\n" +
14671468
"\n\n" +
14681469
"import { safeLoad, getDivHeight, jsonToYaml, updateStyle, updateStyle2, validateField, toggleDescription } from '../../helpers';\n" +
14691470
"\n" +
@@ -1803,7 +1804,7 @@ public static String toUpperCasename(String input)
18031804
/**
18041805
* The component index page contains the template that is used to generated the index.js file for each YAML component.
18051806
*/
1806-
public static String COMPONENT_INDEX_PAGE = "import " + PAGENAME_MACRO + " from './" + PAGENAME_MACRO + "';\n" +
1807-
"export default " + PAGENAME_MACRO + ";";
1807+
public static String COMPONENT_INDEX_PAGE = "import " + COMPONENT_MACRO + " from './" + PAGENAME_MACRO + "';\n" +
1808+
"export default " + COMPONENT_MACRO + ";";
18081809

18091810
}

config-ui/generator/src/com/ibm/iag/ui/GenerateReactUI.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class GenerateReactUI
3131
{
3232
public static String HEADER_FILE = "components/IAGHeader/IAGHeader.js";
3333
public static String APP_FILE = "App.js";
34+
public static String INDEX_FILE = "index.js";
3435
public static String CUSTOM_VALIDATION_FILE = "/public/yaml_linter/worker-yaml.js";
3536
public static String LANDING_PAGE_FILE = "/src/content/landingPage/landingPage.js";
3637
public static String INDEX_HTML_FILE = "/public/index.html";
@@ -424,7 +425,7 @@ private static void createPages() throws Exception
424425
if(parts[0].endsWith("Page"))
425426
{
426427
// Create the index
427-
String indexContent = Constants.COMPONENT_INDEX_PAGE.replaceAll(Constants.PAGENAME_MACRO, parts[0]);
428+
String indexContent = Constants.COMPONENT_INDEX_PAGE.replaceAll(Constants.PAGENAME_MACRO, parts[0]).replaceAll(Constants.COMPONENT_MACRO, Constants.toUpperCasename(parts[0]));
428429

429430
realFileName = contentDir + "/index.js";
430431
updateFile(realFileName, indexContent);
@@ -635,7 +636,7 @@ private static void createHelper(List<String> compNames) throws Exception
635636
*/
636637
private static void updateRoutes() throws Exception
637638
{
638-
String fileName = _outputDir + "/src/" + APP_FILE;
639+
String fileName = _outputDir + "/src/" + INDEX_FILE;
639640
File file = new File(fileName);
640641
if(file.exists())
641642
{

config-ui/react.skeleton/package.json

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,23 @@
1414
"format:staged": "prettier --write"
1515
},
1616
"dependencies": {
17-
"ace-builds": "1.4.12",
18-
"apollo-boost": "0.4.2",
19-
"carbon-components": "10.24.0",
20-
"carbon-components-react": "7.24.0",
21-
"carbon-icons": "7.0.7",
22-
"graphql": "14.3.1",
23-
"js-yaml": "4.0.0",
24-
"react": "16.8.6",
25-
"react-ace": "9.1.4",
26-
"react-apollo": "2.5.6",
27-
"react-collapsible": "2.8.1",
28-
"react-dom": "16.8.6",
29-
"react-router-dom": "5.0.0",
30-
"react-scripts": "2.1.8",
31-
"react-tooltip": "4.2.11",
32-
"react-web-tabs": "1.0.1"
17+
"ace-builds": "^1.31.1",
18+
"carbon-components": "^10.24.0",
19+
"carbon-components-react": "^7.24.0",
20+
"carbon-icons": "^7.0.7",
21+
"js-yaml": "^4.1.0",
22+
"react": "^18.3.1",
23+
"react-ace": "^12.0.0",
24+
"react-collapsible": "^2.10.0",
25+
"react-dom": "^18.3.1",
26+
"react-router-dom": "^6.26.1",
27+
"react-scripts": "^5.0.1",
28+
"react-tooltip": "^5.28.0",
29+
"react-web-tabs": "^1.0.1"
3330
},
3431
"devDependencies": {
35-
"node-sass": "4.12.0"
32+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
33+
"sass": "1.77.8"
3634
},
3735
"eslintConfig": {
3836
"extends": "react-app"

config-ui/react.skeleton/src/App.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import './app.scss';
33
import './rwttabs.scss';
44
import { Content } from 'carbon-components-react/lib/components/UIShell';
55
import IAGHeader from './components/IAGHeader';
6-
import { Route, Switch } from 'react-router-dom';
7-
import landingPage from './content/landingPage';
8-
<ADD_IMPORTS_HERE>
9-
10-
6+
import { Outlet } from 'react-router-dom';
117

128
class App extends Component {
139
render() {
@@ -17,10 +13,7 @@ class App extends Component {
1713
<Content>
1814
<div className="bx--row">
1915
<section className="bx--offset-lg-3 bx--col-lg-13">
20-
<Switch>
21-
<Route exact path="/" component={landingPage} />
22-
<ADD_ROUTES_HERE>
23-
</Switch>
16+
<Outlet />
2417
</section>
2518
</div>
2619
</Content>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import landingPage from './landingPage';
2-
export default landingPage;
1+
import LandingPage from './landingPage';
2+
export default LandingPage;

config-ui/react.skeleton/src/content/landingPage/landingPage.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ import yaml from 'js-yaml';
1515

1616
const DOC_URL = "https://docs.verify.ibm.com/gateway/docs/";
1717

18-
const SAMPLE_EMPTY_YAML = "version: 23.10";
18+
const SAMPLE_EMPTY_YAML = "version: 24.09";
1919

2020
const SAMPLE_EMPTY = {
2121
"yaml": SAMPLE_EMPTY_YAML,
2222
"link": "#"
2323
}
2424

25-
const SAML_AUTHZ_YAML = "version: \"23.10\"\n" +
25+
const SAML_AUTHZ_YAML = "version: \"24.09\"\n" +
2626
"#\n" +
2727
"# Configure an IAG container to proxy a single Web application, and define \n" +
2828
"# an authorization policy for the Web application. This configuration will \n" +
@@ -132,7 +132,7 @@ const SAMPLE_AUTHZ = {
132132
"link": DOC_URL + "examples-authorization-yaml"
133133
}
134134

135-
const SAMPLE_BASIC_YAML = "version: \"23.10\"\n" +
135+
const SAMPLE_BASIC_YAML = "version: \"24.09\"\n" +
136136
"\n" +
137137
"#\n" +
138138
"# Configure an IAG container with a very basic configuration. This \n" +
@@ -191,7 +191,7 @@ const SAMPLE_BASIC = {
191191
"link": DOC_URL + "examples-oidc-verify-yaml"
192192
}
193193

194-
const SAMPLE_ISVA_YAML = "version: \"23.10\"\n" +
194+
const SAMPLE_ISVA_YAML = "version: \"24.09\"\n" +
195195
"\n" +
196196
"#\n" +
197197
"# Configure an IAG container with a very basic configuration. This \n" +
@@ -257,7 +257,7 @@ const SAMPLE_ISVA = {
257257
"link": DOC_URL + "examples-oidc-verify-access-yaml"
258258
}
259259

260-
const SAMPLE_CREDVIEWER_YAML = "version: \"23.10\"\n" +
260+
const SAMPLE_CREDVIEWER_YAML = "version: \"24.09\"\n" +
261261
"\n" +
262262
"#\n" +
263263
"# Configure an IAG container with a very basic configuration. This \n" +
@@ -330,7 +330,7 @@ const SAMPLE_CREDVIEWER = {
330330
"link": DOC_URL + "examples-cred-viewer-yaml"
331331
}
332332

333-
const SAMPLE_LWP_YAML = "version: \"23.10\"\n" +
333+
const SAMPLE_LWP_YAML = "version: \"24.09\"\n" +
334334
"\n" +
335335
"#\n" +
336336
"# Configure an IAG container with a very basic configuration. This \n" +
@@ -397,7 +397,7 @@ const SAMPLE_LWP = {
397397
"link": DOC_URL + "examples-local-webpages-yaml"
398398
}
399399

400-
const SAMPLE_RL_YAML = "version: \"23.10\"\n" +
400+
const SAMPLE_RL_YAML = "version: \"24.09\"\n" +
401401
"\n" +
402402
"#\n" +
403403
"# Configure an IAG container to proxy a single Web application. This \n" +
@@ -494,7 +494,7 @@ const SAMPLE_RL = {
494494
"link": DOC_URL + "examples-rate-limiting-yaml"
495495
};
496496

497-
const SAMPLE_STDAPP_YAML = "version: \"23.10\"\n" +
497+
const SAMPLE_STDAPP_YAML = "version: \"24.09\"\n" +
498498
"\n" +
499499
"#\n" +
500500
"# Configure an IAG container to proxy a single Web application. This \n" +
@@ -563,7 +563,7 @@ const SAMPLE_STDAPP = {
563563
"link": DOC_URL + "examples-standard-application-yaml"
564564
};
565565

566-
const SAMPLE_TRACING_YAML = "version: \"23.10\"\n" +
566+
const SAMPLE_TRACING_YAML = "version: \"24.09\"\n" +
567567
"\n" +
568568
"#\n" +
569569
"# Configure an IAG container to proxy a single Web application, and activate\n" +
@@ -647,7 +647,7 @@ const SAMPLE_TRACING = {
647647
"link": DOC_URL + "examples-tracing-yaml"
648648
};
649649

650-
const SAMPLE_UNAUTH_YAML = "version: \"23.10\"\n" +
650+
const SAMPLE_UNAUTH_YAML = "version: \"24.09\"\n" +
651651
"\n" +
652652
"#\n" +
653653
"# Configure an IAG container to proxy a single Web application. Due to the\n" +
@@ -671,7 +671,7 @@ const SAMPLE_UNAUTH = {
671671
"link": DOC_URL + "examples-unauth-application-yaml"
672672
};
673673

674-
const SAMPLE_ISV_2FA_YAML = "version: \"23.10\"\n" +
674+
const SAMPLE_ISV_2FA_YAML = "version: \"24.09\"\n" +
675675
"\n" +
676676
"#\n" +
677677
"# Configure an IAG container to proxy a single Web application, and define\n" +
@@ -756,7 +756,7 @@ const SAMPLE_ISV_2FA = {
756756
"link": DOC_URL + "examples-2fa-verify-yaml"
757757
};
758758

759-
const SAMPLE_VH_YAML = "version: \"23.10\"\n" +
759+
const SAMPLE_VH_YAML = "version: \"24.09\"\n" +
760760
"\n" +
761761
"#\n" +
762762
"# Configure an IAG container to proxy a single virtual host Web application. \n" +
@@ -825,7 +825,7 @@ const SAMPLE_VH = {
825825
"link": DOC_URL + "examples-virtualhost-application-yaml"
826826
};
827827

828-
const SAMPLE_HTTPTRAN_YAML = "version: \"23.10\"\n" +
828+
const SAMPLE_HTTPTRAN_YAML = "version: \"24.09\"\n" +
829829
"\n" +
830830
"#\n" +
831831
"# Configure an IAG container to proxy a single Web application. This \n" +
@@ -925,7 +925,7 @@ const SAMPLE_HTTPTRAN = {
925925
"link": DOC_URL + "examples-transformation-yaml"
926926
};
927927

928-
const SAMPLE_OAUTH_ISVA_YAML = "version: \"23.10\"\n" +
928+
const SAMPLE_OAUTH_ISVA_YAML = "version: \"24.09\"\n" +
929929
"\n" +
930930
"#\n" +
931931
"# Configure an IAG container with a very basic configuration. This \n" +
@@ -981,7 +981,7 @@ const SAMPLE_OAUTH_ISVA = {
981981
"link": DOC_URL + "examples-oauth-verify-access-yaml"
982982
};
983983

984-
const SAMPLE_OAUTH_ISV_YAML = "version: \"23.10\"\n" +
984+
const SAMPLE_OAUTH_ISV_YAML = "version: \"24.09\"\n" +
985985
"\n" +
986986
"#\n" +
987987
"# Configure an IAG container with a very basic configuration. This \n" +

config-ui/react.skeleton/src/index.js

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
1-
import 'core-js/modules/es7.array.includes';
2-
import 'core-js/modules/es6.array.fill';
3-
import 'core-js/modules/es6.string.includes';
4-
import 'core-js/modules/es6.string.trim';
5-
import 'core-js/modules/es7.object.values';
6-
71
import React from 'react';
82
import ReactDOM from 'react-dom';
93
import './index.scss';
104
import App from './App';
115
import * as serviceWorker from './serviceWorker';
12-
import { HashRouter as Router } from 'react-router-dom';
13-
import ApolloClient from 'apollo-boost';
14-
import { ApolloProvider } from 'react-apollo';
6+
import { createHashRouter, RouterProvider } from 'react-router-dom';
7+
import LandingPage from './content/landingPage';
8+
<ADD_IMPORTS_HERE>
9+
1510

16-
const client = new ApolloClient({
17-
uri: 'https://api.github.com/graphql',
18-
headers: {
19-
authorization: `Bearer ${
20-
process.env.REACT_APP_GITHUB_PERSONAL_ACCESS_TOKEN
21-
}`,
11+
const router = createHashRouter([
12+
{
13+
path: "/",
14+
element: <App />,
15+
children: [
16+
{
17+
path: "/",
18+
element: <LandingPage />
19+
},
20+
<ADD_ROUTES_HERE>
21+
]
2222
},
23-
});
23+
])
2424

2525
ReactDOM.render(
26-
<ApolloProvider client={client}>
27-
<Router>
28-
<App />
29-
</Router>
30-
</ApolloProvider>,
26+
<RouterProvider router={router} />,
3127
document.getElementById('root')
3228
);
3329

0 commit comments

Comments
 (0)