Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applications Support for Devportal #59

Open
wants to merge 34 commits into
base: release-1.0.0-m1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c67b957
Load Applications from Mock Data
piyumaldk Nov 19, 2024
451021f
Get application page
piyumaldk Nov 21, 2024
89d47f3
Move application page out of applications
piyumaldk Nov 21, 2024
85cb219
Register Partials
piyumaldk Nov 21, 2024
1bf9eeb
Add basic layout for application releated technical pages
piyumaldk Nov 22, 2024
ab69af4
Fix sidebar css
piyumaldk Nov 22, 2024
2abae2c
Overview page
piyumaldk Nov 22, 2024
2b85471
Applications get from APIM cp
piyumaldk Nov 25, 2024
05f0361
Add changes to return real data
piyumaldk Nov 25, 2024
59e3bc3
Add Application Form Basics
piyumaldk Nov 26, 2024
5a3152f
Add Application Page Basic UI
piyumaldk Nov 26, 2024
d378016
Add basic controls of add application
piyumaldk Nov 26, 2024
dc0f010
Add coming information to throttling policy selection
piyumaldk Nov 26, 2024
3e86587
Add the functionality to save applications
piyumaldk Nov 26, 2024
ad0a3ae
Basic Modal for Alerts
piyumaldk Nov 26, 2024
2b647d3
Add alert
piyumaldk Nov 26, 2024
171d72d
Improve the modal to wait
piyumaldk Nov 27, 2024
54bcd24
Fix loading the page when going back
piyumaldk Nov 27, 2024
e489243
UI level changes for delete confirmation
piyumaldk Nov 27, 2024
9d5ac38
Application Page real data
piyumaldk Nov 27, 2024
e4b3c24
Fix name issue
piyumaldk Nov 27, 2024
6a7b09f
Fixed Application linking issue
piyumaldk Nov 28, 2024
233d675
Application deletion functionality
piyumaldk Nov 28, 2024
7e892a2
Add notification for deletion
piyumaldk Nov 28, 2024
6b4f1e3
Add basic structure for edit app page
piyumaldk Nov 28, 2024
dd02c83
Add basic edit page structure
piyumaldk Nov 28, 2024
dabc483
Edit form data
piyumaldk Nov 28, 2024
2bf4b13
Update flow of application
piyumaldk Nov 28, 2024
4eeb013
Add update functionality
piyumaldk Nov 28, 2024
136a994
Complete deletion and edit of applications
piyumaldk Nov 28, 2024
65b90b9
Backend API to reset the throttling policy
piyumaldk Nov 29, 2024
3a1562c
Add basic UIs and functioning for throttle policy reset
piyumaldk Nov 29, 2024
2569df0
Fix the throttling policy reset UI
piyumaldk Nov 29, 2024
f11599f
Add search funtionality to application
piyumaldk Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# dependencies
/node_modules

/dist
cpToken.json

/.pnp
.pnp.js
Expand All @@ -16,7 +18,6 @@
# production
/build

/src/styles
/src/.tmp

/src/config/config.js
Expand Down
9 changes: 5 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"port": 3000,
"pathToContent": "../src/",
"mode": "development",
"pathToContent": "../api-developer-portal/src/",
"mode": "production",
"db": {
"username": "postgres",
"password": "postgres",
"database": "DEVPORTAL_NEWSCHEMA",
"database": "devportal",
"host": "localhost",
"dialect": "postgres"
}
},
"controlPlaneUrl": "https://localhost:9443/api/am/devportal/v3.1"
}
59 changes: 59 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"homepage": "https://github.com/api-developer-portal-core#readme",
"dependencies": {
"@asyncapi/react-component": "^2.3.4",
"axios": "^1.7.7",
"bootstrap-icons": "^1.11.3",
"chokidar": "^3.6.0",
"crypto": "^1.0.1",
Expand All @@ -37,6 +38,7 @@
"graphql": "^16.9.0",
"handlebars": "^4.7.8",
"hbs": "^4.2.0",
"https": "^1.0.0",
"js-yaml": "^4.1.0",
"jsonwebtoken": "^9.0.2",
"marked": "^13.0.3",
Expand Down Expand Up @@ -66,7 +68,8 @@
"**/*.js"
],
"assets": [
"src/pages/**/*"
"src/pages/**/*",
"src/styles/**/*"
],
"targets": [
"node18-macos-x64",
Expand Down
4 changes: 4 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const authRoute = require('./routes/authRoute');
const devportalRoute = require('./routes/devportalRoute');
const orgContent = require('./routes/orgContentRoute');
const apiContent = require('./routes/apiContentRoute');
const applicationContent = require('./routes/applicationsContentRoute');
const customContent = require('./routes/customPageRoute');
const config = require(process.cwd() + '/config.json');
const Handlebars = require('handlebars');
Expand Down Expand Up @@ -76,6 +77,8 @@ passport.deserializeUser((user, done) => {

app.use(constants.ROUTE.STYLES, express.static(path.join(process.cwd(), filePrefix + 'styles')));
app.use(constants.ROUTE.IMAGES, express.static(path.join(process.cwd(), filePrefix + 'images')));
app.use(constants.ROUTE.TECHNICAL_STYLES, express.static(path.join(require.main.filename, '../styles')));
app.use(constants.ROUTE.TECHNICAL_SCRIPTS, express.static(path.join(require.main.filename, '../scripts')));

//backend routes
app.use(constants.ROUTE.DEV_PORTAL, devportalRoute);
Expand All @@ -86,6 +89,7 @@ if (config.mode === constants.DEV_MODE) {
} else {
app.use(constants.ROUTE.DEFAULT, authRoute);
app.use(constants.ROUTE.DEFAULT, apiContent);
app.use(constants.ROUTE.DEFAULT, applicationContent);
app.use(constants.ROUTE.DEFAULT, orgContent);
app.use(constants.ROUTE.DEFAULT, customContent);
}
Expand Down
16 changes: 8 additions & 8 deletions src/controllers/apiContentController.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const loadAPIs = async (req, res) => {
const templateContent = {
apiMetadata: await loadAPIMetaDataList(),
baseUrl: constants.BASE_URL + config.port
};
html = renderTemplate(filePrefix + 'pages/apis/page.hbs', filePrefix + 'layout/main.hbs', templateContent);
}
html = renderTemplate(filePrefix + 'pages/apis/page.hbs', filePrefix + 'layout/main.hbs', templateContent, false);
} else {
try {
const organization = await adminDao.getOrganization(orgName);
Expand All @@ -54,8 +54,8 @@ const loadAPIs = async (req, res) => {
console.log("Rendering default api listing page from file");
const templateContent = {
baseUrl: constants.BASE_URL + config.port
};
html = renderTemplate(filePrefix + 'pages/apis/page.hbs', filePrefix + 'layout/main.hbs', templateContent);
}
html = renderTemplate(filePrefix + 'pages/apis/page.hbs', filePrefix + 'layout/main.hbs', templateContent, false);
}
}
res.send(html);
Expand All @@ -78,8 +78,8 @@ const loadAPIContent = async (req, res) => {
apiMetadata: metaData,
baseUrl: constants.BASE_URL + config.port,
schemaUrl: orgName + '/mock/' + apiName + '/apiDefinition.xml'
};
html = renderTemplate(filePrefix + 'pages/api-landing/page.hbs', filePrefix + 'layout/main.hbs', templateContent);
}
html = renderTemplate(filePrefix + 'pages/api-landing/page.hbs', filePrefix + 'layout/main.hbs', templateContent, false)
} else {
try {
const organization = await adminDao.getOrganization(orgName);
Expand Down Expand Up @@ -116,8 +116,8 @@ const loadTryOutPage = async (req, res) => {
baseUrl: constants.BASE_URL + config.port,
apiType: metaData.apiInfo.apiType,
swagger: apiDefinition
};
html = renderTemplate('../pages/tryout/page.hbs', filePrefix + 'layout/main.hbs', templateContent);
}
html = renderTemplate('../pages/tryout/page.hbs', filePrefix + 'layout/main.hbs', templateContent, true);
} else {
try {
const organization = await adminDao.getOrganization(orgName);
Expand Down
Loading