Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
Release v0.1 (#155)
Browse files Browse the repository at this point in the history
* adding logo to title (#149)

* adding logo to the title (Issue #147 )

* v0.1.0
  • Loading branch information
obadrawi authored Mar 14, 2019
1 parent 7cdd488 commit b1a0038
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 32 deletions.
6 changes: 3 additions & 3 deletions app-connector-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@varkes/app-connector-client",
"version": "0.0.0",
"version": "0.1.0",
"description": "Client for Kyma application connectivity",
"main": "server/app.js",
"scripts": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@varkes/example-kyma-mock": "^0.0.0",
"@varkes/example-kyma-mock": "^0.1.0",
"mocha": "^6.0.2",
"nyc": "^13.3.0",
"supertest": "^3.4.2"
Expand All @@ -43,4 +43,4 @@
"varkes-connector-cli": "./tools/cli.js",
"varkes-connector-server": "./server/server.js"
}
}
}
8 changes: 6 additions & 2 deletions app-connector-client/server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const connector = require("./routes/connector");
const events = require("./routes/events")
var apis = require("./routes/apis")
var keys = require("./keys")

const VARKES_LOGO = path.resolve(__dirname, 'views/static/logo.svg')
module.exports = function (varkesConfigPath = null, nodePortParam = null) {
var app = express()
app.use(bodyParser.json());
Expand All @@ -36,7 +36,11 @@ module.exports = function (varkesConfigPath = null, nodePortParam = null) {
app.get("/", function (req, res) {
res.render('index', { appName: varkesConfig.name })
})

app.get("/logo", function (req, res) {
var img = fs.readFileSync(varkesConfig.logo || VARKES_LOGO);
res.writeHead(200, { 'Content-Type': "image/svg+xml" });
res.end(img, 'binary');
});
app.get("/metadata", function (req, res) {
res.sendFile(path.resolve(__dirname, "resources/api.yaml"))
})
Expand Down
3 changes: 3 additions & 0 deletions app-connector-client/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ function configValidation(configJson) {
}
}
}
if (configJson.logo && !configJson.logo.match(/^.+\.(svg)$/)) {
error_message += "\nlogo image must be in svg format"
}
if (error_message != "") {
throw new Error("Validation of configuration failed: " + error_message);
}
Expand Down
5 changes: 3 additions & 2 deletions app-connector-client/server/views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer
mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<span id="app-title" class="mdl-layout-title">
<div class="mdl-layout__header-row" style="background-color: rgb(250, 250, 250)">
<image width="50" height="50" id="app-logo" srcset="/logo" />
<span style="color: black" id="app-title" class="mdl-layout-title">
<%= appName %></span>
<div class="mdl-layout-spacer"></div>

Expand Down
1 change: 1 addition & 0 deletions app-connector-client/test/varkes_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"404": "{\"error\":\"End Point not found\"}"
},
"name": "app-connector-mock",
"logo": "../logos/logo.svg",
"events": [
{
"specification": "test/events1.json",
Expand Down
8 changes: 4 additions & 4 deletions examples/combined-odata-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@varkes/example-combined-odata-mock",
"version": "0.0.0",
"version": "0.1.0",
"description": "combined example of odata and app-connector-client",
"main": "app.js",
"private": true,
Expand All @@ -15,8 +15,8 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@varkes/app-connector-client": "^0.0.0",
"@varkes/odata-mock": "^0.0.0",
"@varkes/app-connector-client": "^0.1.0",
"@varkes/odata-mock": "^0.1.0",
"express": "^4.16.4"
},
"devDependencies": {
Expand All @@ -27,4 +27,4 @@
"type": "ssh",
"url": "[email protected]:kyma-incubator/varkes.git"
}
}
}
8 changes: 4 additions & 4 deletions examples/combined-openapi-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@varkes/example-combined-openapi-mock",
"version": "0.0.0",
"version": "0.1.0",
"description": "combined example of varkes openapi-mock and varkes app-connector-client",
"main": "app.js",
"private": true,
Expand All @@ -15,8 +15,8 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@varkes/app-connector-client": "^0.0.0",
"@varkes/openapi-mock": "^0.0.0",
"@varkes/app-connector-client": "^0.1.0",
"@varkes/openapi-mock": "^0.1.0",
"express": "^4.16.4"
},
"devDependencies": {
Expand All @@ -27,4 +27,4 @@
"type": "ssh",
"url": "[email protected]:kyma-incubator/varkes.git"
}
}
}
6 changes: 3 additions & 3 deletions examples/kyma-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@varkes/example-kyma-mock",
"version": "0.0.0",
"version": "0.1.0",
"description": "Standalone example of varkes kyma-mock",
"main": "app.js",
"private": true,
Expand All @@ -15,7 +15,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@varkes/openapi-mock": "^0.0.0",
"@varkes/openapi-mock": "^0.1.0",
"express": "^4.16.4",
"uuid": "^3.3.2"
},
Expand All @@ -27,4 +27,4 @@
"type": "ssh",
"url": "[email protected]:kyma-incubator/varkes.git"
}
}
}
6 changes: 3 additions & 3 deletions examples/odata-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@varkes/example-odata-mock",
"version": "0.0.0",
"version": "0.1.0",
"description": "Standalone example of varkes odataapi-mock",
"main": "app.js",
"private": true,
Expand All @@ -15,7 +15,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@varkes/odata-mock": "^0.0.0",
"@varkes/odata-mock": "^0.1.0",
"express": "^4.16.4"
},
"devDependencies": {
Expand All @@ -26,4 +26,4 @@
"type": "ssh",
"url": "[email protected]:kyma-incubator/varkes.git"
}
}
}
6 changes: 3 additions & 3 deletions examples/openapi-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@varkes/example-openapi-mock",
"version": "0.0.0",
"version": "0.1.0",
"description": "Standalone example of varkes openapi-mock",
"main": "app.js",
"private": true,
Expand All @@ -15,7 +15,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@varkes/openapi-mock": "^0.0.0",
"@varkes/openapi-mock": "^0.1.0",
"express": "^4.16.4"
},
"devDependencies": {
Expand All @@ -26,4 +26,4 @@
"type": "ssh",
"url": "[email protected]:kyma-incubator/varkes.git"
}
}
}
10 changes: 5 additions & 5 deletions examples/stress-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@varkes/stress-mock",
"version": "0.0.0",
"version": "0.1.0",
"description": "combined stress test example of varkes openapi-mock, varkes odata-mock and varkes app-connector-client",
"main": "app.js",
"private": true,
Expand All @@ -14,9 +14,9 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@varkes/app-connector-client": "^0.0.0",
"@varkes/openapi-mock": "^0.0.0",
"@varkes/odata-mock": "^0.0.0",
"@varkes/app-connector-client": "^0.1.0",
"@varkes/odata-mock": "^0.1.0",
"@varkes/openapi-mock": "^0.1.0",
"express": "^4.16.4"
},
"devDependencies": {
Expand All @@ -27,4 +27,4 @@
"type": "ssh",
"url": "[email protected]:kyma-incubator/varkes.git"
}
}
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"./odata-mock",
"./openapi-mock"
],
"version": "0.0.0"
"version": "0.1.0"
}
2 changes: 1 addition & 1 deletion odata-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@varkes/odata-mock",
"version": "0.0.0",
"version": "0.1.0",
"main": "server/app.js",
"engines": {
"node": ">=4"
Expand Down
2 changes: 1 addition & 1 deletion openapi-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@varkes/openapi-mock",
"version": "0.0.0",
"version": "0.1.0",
"private": false,
"description": "Open API Mock",
"keywords": [],
Expand Down

0 comments on commit b1a0038

Please sign in to comment.