Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #3 from dm-drogeriemarkt/opensource_fixes
Browse files Browse the repository at this point in the history
Opensource fixes
  • Loading branch information
wicked539 authored Dec 13, 2017
2 parents 9636f37 + d7c96e5 commit 7d437e7
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 96 deletions.
6 changes: 6 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Sven Müller <[email protected]>(https://github.com/wicked539)
Bastian Dupps <[email protected]>(https://github.com/dupps)
David Gonzales-Casin<[email protected]>(https://github.com/Gonzo17)
Rudi Forsch<[email protected]>(https://github.com/rudifordm)
Arnold Franke <[email protected]>(https://github.com/indyarni)
Erik Altmann <[email protected]>
23 changes: 0 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,29 +303,6 @@
</excludes>
</resource>
</resources>

</build>

<repositories>
<repository>
<id>artifactory</id>
<url>https://artifactory.dm-drogeriemarkt.com/artifactory/repo</url>
</repository>
</repositories>

<distributionManagement>
<repository>
<id>artifactory</id>
<name>artifactory.dm-drogeriemarkt.com-releases</name>
<url>https://artifactory.dm-drogeriemarkt.com/artifactory/releases-kunde</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>artifactory.dm-drogeriemarkt.com-snapshots</name>
<url>https://artifactory.dm-drogeriemarkt.com/artifactory/snapshots-kunde</url>
</snapshotRepository>

</distributionManagement>


</project>
100 changes: 50 additions & 50 deletions src/main/javascript/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import mime from 'rest/interceptor/mime';
import rest from 'rest';
import ReactDOM from 'react-dom';
import React from 'react';
import { Provider } from 'react-redux';
import {Provider} from 'react-redux';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MicroserviceFilterBox from './components/microserviceFilterbox';
Expand All @@ -13,7 +13,7 @@ import AddEditDialog from './components/addEditDialog';
import MicroserviceDeleteServiceDialog from './components/microserviceDeleteServiceDialog';
import LoginDialog from './components/loginDialog';
import store from './stores/microserviceStore';
import { getRequiredPropertyNames } from './shared/requiredPropertyUtil';
import {getRequiredPropertyNames} from './shared/requiredPropertyUtil';

// see http://www.material-ui.com/#/get-started/installation
injectTapEventPlugin();
Expand All @@ -23,19 +23,19 @@ class App extends React.Component {
componentDidMount() {

let client = rest.wrap(mime).wrap(errorCode);
client({ path: '/selavi/services/stages' }).then(response => {
client({path: '/selavi/services/stages'}).then(response => {
store.dispatch({
type: 'FETCH_AVAILABLE_STAGES_SUCCESS',
response: response
});
client({ path: '/selavi/services/' + store.getState().stage }).then(response => {
client({path: '/selavi/services/' + store.getState().stage}).then(response => {
store.dispatch({
type: 'FETCH_MICROSERVICES_SUCCESS',
response: response
});
});
});
client({ path: '/selavi/user' }).then(response => {
client({path: '/selavi/user'}).then(response => {
store.dispatch({
type: 'LOGIN_SUCCESS',
loggedInUser: response.entity
Expand All @@ -45,15 +45,15 @@ class App extends React.Component {

render() {
const serviceBusinessInputFields = {
"id": { label: "Service ID *", hint: "eg. \"ZOE\"", required: true },
"label": { label: "Label *", hint: "eg. \"ZOE\"", required: true },
"id": {label: "Service ID *", hint: "eg. \"ZOE\"", required: true},
"label": {label: "Label *", hint: "eg. \"ZOE\"", required: true},
"fdOwner": {
label: "Contact Person *",
hint: "eg. \"Altmann, Erik\"",
required: true,
searchEndpoint: "/selavi/person/search"
},
"tags": { label: "Tags", hint: "eg. \"dm-pos-belege, produktdaten\"", required: false },
"tags": {label: "Tags", hint: "eg. \"dm-pos-belege, produktdaten\"", required: false},
"description": {
label: "Description *",
hint: "eg. \"ZKDB Online Echtzeitf\u00e4hig\"",
Expand All @@ -63,89 +63,89 @@ class App extends React.Component {
};

const serviceTechInputFields = {
"microserviceUrl": { label: "URL", hint: "eg. \"https://zoe.dm.de\"", required: false },
"ipAddress": { label: "IP address(es)", hint: "eg. \"172.23.68.213\"", required: false },
"networkZone": { label: "Network zone", hint: "eg. \"LAN\"", required: false },
"external": { type: "toggle", label: "External service (eg., not a microservice)" }
"microserviceUrl": {label: "URL", hint: "eg. \"https://example.organization.de\"", required: false},
"ipAddress": {label: "IP address(es)", hint: "eg. \"172.23.68.213\"", required: false},
"networkZone": {label: "Network zone", hint: "eg. \"LAN\"", required: false},
"external": {type: "toggle", label: "External service (eg., not a microservice)"}
};

const serviceDocumentationInputFields = {
"documentationLink": {
label: "Link to documentation *",
hint: "eg. \"https://wiki.dm.de/ZOE\"",
hint: "eg. \"https://wiki.example.de/ZOE\"",
required: true,
isLink: true
},
"buildMonitorLink": {
label: "Link to Build Monitor",
hint: "eg. \"https://zoe-jenkins.dm.de\"",
hint: "eg. \"https://example-jenkins.organization.de\"",
required: false,
isLink: true
},
"monitoringLink": {
label: "Link to Monitoring",
hint: "eg. \"https://elk-kibana.dm.de\"",
hint: "eg. \"https://kibana.organization.de\"",
required: false,
isLink: true
},
"bitbucketUrl": {
label: "Bitbucket URL *",
hint: "eg. \"https://stash.dm.de/projects/ZOE/repos/zoe\"",
hint: "eg. \"https://stash.example.de/projects/ZOE/repos/zoe\"",
required: true,
isLink: true
}
};


const serviceInputTabs = [
{ label: "Business", inputFields: serviceBusinessInputFields },
{ label: "Technical", inputFields: serviceTechInputFields },
{ label: "Documentation", inputFields: serviceDocumentationInputFields }
{label: "Business", inputFields: serviceBusinessInputFields},
{label: "Technical", inputFields: serviceTechInputFields},
{label: "Documentation", inputFields: serviceDocumentationInputFields}
];

const serviceRequiredProperties = getRequiredPropertyNames(serviceInputTabs);

const relationBasicFields = {
"target": { label: "Consumed service", required: true, disabled: true },
"type": { label: "Type of relation", hint: "eg. \"REST\", \"SOAP\"", required: false }
"target": {label: "Consumed service", required: true, disabled: true},
"type": {label: "Type of relation", hint: "eg. \"REST\", \"SOAP\"", required: false}
};

const relationInputTabs = [
{ label: "Basic", inputFields: relationBasicFields }
{label: "Basic", inputFields: relationBasicFields}
];

return (
<div className="appcontainer">
<div className="appheader">
<MicroserviceFilterBox serviceRequiredProperties={serviceRequiredProperties}/>
</div>
<div className="appcontent">
<MicroserviceMindmap serviceRequiredProperties={serviceRequiredProperties}/>
</div>
<div className="appfooter">
<MicroserviceSnackbar/>
<AddEditDialog inputTabs={serviceInputTabs}
addMenuMode="ADD_SERVICE"
editMenuMode="EDIT_SERVICE"
showMenuMode="SHOW_SERVICE"
entityDisplayName="Service"/>
<AddEditDialog inputTabs={relationInputTabs}
addMenuMode="ADD_RELATION"
editMenuMode="EDIT_RELATION"
entityDisplayName="Link"/>
<MicroserviceDeleteServiceDialog/>
<LoginDialog/>
</div>
</div>
<div className="appcontainer">
<div className="appheader">
<MicroserviceFilterBox serviceRequiredProperties={serviceRequiredProperties}/>
</div>
<div className="appcontent">
<MicroserviceMindmap serviceRequiredProperties={serviceRequiredProperties}/>
</div>
<div className="appfooter">
<MicroserviceSnackbar/>
<AddEditDialog inputTabs={serviceInputTabs}
addMenuMode="ADD_SERVICE"
editMenuMode="EDIT_SERVICE"
showMenuMode="SHOW_SERVICE"
entityDisplayName="Service"/>
<AddEditDialog inputTabs={relationInputTabs}
addMenuMode="ADD_RELATION"
editMenuMode="EDIT_RELATION"
entityDisplayName="Link"/>
<MicroserviceDeleteServiceDialog/>
<LoginDialog/>
</div>
</div>
)
}
}

ReactDOM.render(
<MuiThemeProvider>
<Provider store={store}>
<App />
</Provider>
</MuiThemeProvider>,
document.getElementById('react')
<MuiThemeProvider>
<Provider store={store}>
<App/>
</Provider>
</MuiThemeProvider>,
document.getElementById('react')
);
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ selavi.property.blacklist=instanceId,hostName,app,ipAddr,status,overriddenstatus
# only for development usage
eureka.instance.metadata-map.ignoredCommitters=username:password
eureka.instance.metadata-map.bitbucketUrl=https://example.com/rest/api/1.0/projects/MIC/repos/selavi
eureka.instance.metadata-map.fdOwner=Erik Altmann
eureka.instance.metadata-map.fdOwner=Owner McOwnface
eureka.instance.metadata-map.tags=Microservice Overview
eureka.instance.metadata-map.description=Dient als \U00fcbersicht aller verfügbaren Microservices
eureka.instance.metadata-map.microserviceUrl=https://example.com/
Expand Down
4 changes: 2 additions & 2 deletions src/test/javascript/components/addEditDialog.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ describe('<AddEditDialog/>', function () {
inputFields: {
"id": { label: "Service ID *", hint: "eg. \"ZOE\"", required: true },
"label": { label: "Label *", hint: "eg. \"ZOE\"", required: true },
"fdOwner": { label: "Filiadata-Owner *", required: true, searchEndpoint: "/selavi/person/search" }
"fdOwner": { label: "Owner *", required: true, searchEndpoint: "/selavi/person/search" }
}
});

Expand All @@ -350,7 +350,7 @@ describe('<AddEditDialog/>', function () {
inputFields: {
"id": { label: "Service ID *", hint: "eg. \"ZOE\"", required: true },
"label": { label: "Label *", hint: "eg. \"ZOE\"", required: true },
"fdOwner": { label: "Filiadata-Owner *", required: true, searchEndpoint: "/selavi/person/search" }
"fdOwner": { label: "Owner *", required: true, searchEndpoint: "/selavi/person/search" }
}
});

Expand Down
37 changes: 17 additions & 20 deletions src/test/javascript/shared/requiredPropertyUtil.spec.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import chai from 'chai';
import {
getRequiredPropertyNames,
hasAllRequiredProperties
} from '../../../main/javascript/shared/requiredPropertyUtil';
import {getRequiredPropertyNames, hasAllRequiredProperties} from '../../../main/javascript/shared/requiredPropertyUtil';

describe('requiredPropertyUtil', function () {
describe('getRequiredPropertyNames', function () {
it('returns array of required property names', function () {

const serviceBusinessInputFields = {
"id": { label: "Service ID *", hint: "eg. \"ZOE\"", required: true },
"label": { label: "Label *", hint: "eg. \"ZOE\"", required: true },
"id": {label: "Service ID *", hint: "eg. \"ZOE\"", required: true},
"label": {label: "Label *", hint: "eg. \"ZOE\"", required: true},
"fdOwner": {
label: "Contact Person *",
hint: "eg. \"Altmann, Erik\"",
required: true,
searchEndpoint: "/selavi/person/search"
},
"tags": { label: "Tags", hint: "eg. \"dm-pos-belege, produktdaten\"", required: false },
"tags": {label: "Tags", hint: "eg. \"dm-pos-belege, produktdaten\"", required: false},
"description": {
label: "Description",
hint: "eg. \"ZKDB Online Echtzeitf\u00e4hig\"",
Expand All @@ -27,44 +24,44 @@ describe('requiredPropertyUtil', function () {
};

const serviceTechInputFields = {
"microserviceUrl": { label: "URL", hint: "eg. \"https://zoe.dm.de\"", required: false },
"ipAddress": { label: "IP address(es)", hint: "eg. \"172.23.68.213\"", required: false },
"networkZone": { label: "Network zone", hint: "eg. \"LAN\"", required: false },
"external": { type: "toggle", label: "External service (eg., not a microservice)" }
"microserviceUrl": {label: "URL", hint: "eg. \"https://zoe.organization.de\"", required: false},
"ipAddress": {label: "IP address(es)", hint: "eg. \"172.23.68.213\"", required: false},
"networkZone": {label: "Network zone", hint: "eg. \"LAN\"", required: false},
"external": {type: "toggle", label: "External service (eg., not a microservice)"}
};

const serviceDocumentationInputFields = {
"documentationLink": {
label: "Link to documentation",
hint: "eg. \"https://wiki.dm.de/ZOE\"",
hint: "eg. \"https://wiki.organization.de/ZOE\"",
required: false,
isLink: true
},
"buildMonitorLink": {
label: "Link to Build Monitor",
hint: "eg. \"https://zoe-jenkins.dm.de\"",
hint: "eg. \"https://zoe-jenkins.organization.de\"",
required: false,
isLink: true
},
"monitoringLink": {
label: "Link to Monitoring",
hint: "eg. \"https://elk-kibana.dm.de\"",
hint: "eg. \"https://elk-kibana.organization.de\"",
required: false,
isLink: true
},
"bitbucketUrl": {
label: "Bitbucket URL",
hint: "eg. \"https://stash.dm.de/projects/ZOE/repos/zoe\"",
hint: "eg. \"https://stash.organization.de/projects/ZOE/repos/zoe\"",
required: false,
isLink: true
}
};


const serviceInputTabs = [
{ label: "Business", inputFields: serviceBusinessInputFields },
{ label: "Technical", inputFields: serviceTechInputFields },
{ label: "Documentation", inputFields: serviceDocumentationInputFields }
{label: "Business", inputFields: serviceBusinessInputFields},
{label: "Technical", inputFields: serviceTechInputFields},
{label: "Documentation", inputFields: serviceDocumentationInputFields}
];

const result = getRequiredPropertyNames(serviceInputTabs);
Expand All @@ -80,7 +77,7 @@ describe('requiredPropertyUtil', function () {
"id": "selavi",
"label": "selavi",
"tag": "zoe",
"consumes": [{ "target": "GLUECKSKIND-APP", "type": "REST" }],
"consumes": [{"target": "GLUECKSKIND-APP", "type": "REST"}],
"fdOwner": "Erika Esteban Cardoso"
};

Expand All @@ -97,7 +94,7 @@ describe('requiredPropertyUtil', function () {
"id": "selavi",
"label": "selavi",
"tag": "zoe",
"consumes": [{ "target": "GLUECKSKIND-APP", "type": "REST" }],
"consumes": [{"target": "GLUECKSKIND-APP", "type": "REST"}],
"fdOwner": "Erika Esteban Cardoso"
};

Expand Down

0 comments on commit 7d437e7

Please sign in to comment.