Tidy more
This commit is contained in:
parent
9e1c52f1f3
commit
43f633ce0b
@ -2,7 +2,7 @@ import { find, filter } from 'lodash';
|
|||||||
import data from './mock-data';
|
import data from './mock-data';
|
||||||
|
|
||||||
const portal = { username: 'juditgreskovits', host: 'dockerhost'};
|
const portal = { username: 'juditgreskovits', host: 'dockerhost'};
|
||||||
const deployments = data.projects.data;
|
const deploymentGroups = data.projects.data;
|
||||||
const services = data.services.data;
|
const services = data.services.data;
|
||||||
const instances = data.instances.data;
|
const instances = data.instances.data;
|
||||||
const metricTypes = data.metrics.data.types;
|
const metricTypes = data.metrics.data.types;
|
||||||
@ -13,11 +13,11 @@ const resolveFunctions = {
|
|||||||
portal() {
|
portal() {
|
||||||
return portal;
|
return portal;
|
||||||
},
|
},
|
||||||
deployments() {
|
deploymentGroups() {
|
||||||
return deployments;
|
return deploymentGroups;
|
||||||
},
|
},
|
||||||
deployment(_, { uuid }) {
|
deploymentGroup(_, { uuid }) {
|
||||||
return find(deployments, { uuid: uuid });
|
return find(deploymentGroups, { uuid: uuid });
|
||||||
},
|
},
|
||||||
services() {
|
services() {
|
||||||
return services;
|
return services;
|
||||||
@ -35,9 +35,9 @@ const resolveFunctions = {
|
|||||||
return datacenters;
|
return datacenters;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Deployment: {
|
DeploymentGroup: {
|
||||||
services(deployment) {
|
services(deploymentGroup) {
|
||||||
return filter(services, { project: deployment.uuid })
|
return filter(services, { project: deploymentGroup.uuid })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Service: {
|
Service: {
|
||||||
|
@ -9,7 +9,7 @@ type Portal {
|
|||||||
username: String!
|
username: String!
|
||||||
host: String! # dockerhost
|
host: String! # dockerhost
|
||||||
datacenter: Datacenter!
|
datacenter: Datacenter!
|
||||||
deployments: [Deployment]!
|
deploymentGroups: [DeploymentGroup]!
|
||||||
}
|
}
|
||||||
|
|
||||||
type Version {
|
type Version {
|
||||||
@ -17,7 +17,7 @@ type Version {
|
|||||||
version: String! # version uuid
|
version: String! # version uuid
|
||||||
}
|
}
|
||||||
|
|
||||||
type Deployment {
|
type DeploymentGroup {
|
||||||
uuid: String!
|
uuid: String!
|
||||||
name: String!
|
name: String!
|
||||||
datacenter: Datacenter!
|
datacenter: Datacenter!
|
||||||
@ -33,6 +33,7 @@ type DeploymentState {
|
|||||||
|
|
||||||
type Manifest {
|
type Manifest {
|
||||||
uuid: String!
|
uuid: String!
|
||||||
|
deploymentGoup: String!
|
||||||
created: Date!
|
created: Date!
|
||||||
type: String!
|
type: String!
|
||||||
format: String!
|
format: String!
|
||||||
@ -43,6 +44,7 @@ type Manifest {
|
|||||||
type Service {
|
type Service {
|
||||||
uuid: String!
|
uuid: String!
|
||||||
hash: String!
|
hash: String!
|
||||||
|
deploymentGoup: String!
|
||||||
version: Version!
|
version: Version!
|
||||||
name: String!
|
name: String!
|
||||||
instances: [Instance]!
|
instances: [Instance]!
|
||||||
@ -73,6 +75,8 @@ type Package {
|
|||||||
type Instance {
|
type Instance {
|
||||||
uuid: String!
|
uuid: String!
|
||||||
name: String!
|
name: String!
|
||||||
|
deploymentGoup: String!
|
||||||
|
service: String!
|
||||||
metrics: [InstanceMetric]!
|
metrics: [InstanceMetric]!
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,8 +99,8 @@ type Datacenter {
|
|||||||
|
|
||||||
type Query {
|
type Query {
|
||||||
portal: Portal
|
portal: Portal
|
||||||
deployments: [Deployment]
|
deploymentGroups: [DeploymentGroup]
|
||||||
deployment(uuid: String!): Deployment
|
deploymentGroup(uuid: String!): DeploymentGroup
|
||||||
services: [Service]
|
services: [Service]
|
||||||
service(uuid: String!): Service
|
service(uuid: String!): Service
|
||||||
instances: [Instance]
|
instances: [Instance]
|
||||||
@ -106,10 +110,6 @@ type Query {
|
|||||||
datacenters: [Datacenter]
|
datacenters: [Datacenter]
|
||||||
}
|
}
|
||||||
|
|
||||||
type Mutation {
|
|
||||||
createDeployment: Deployment
|
|
||||||
}
|
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default makeExecutableSchema({
|
export default makeExecutableSchema({
|
||||||
|
Loading…
Reference in New Issue
Block a user