mirror of
https://github.com/yldio/copilot.git
synced 2024-11-10 21:30:06 +02:00
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';
|
||||
|
||||
const portal = { username: 'juditgreskovits', host: 'dockerhost'};
|
||||
const deployments = data.projects.data;
|
||||
const deploymentGroups = data.projects.data;
|
||||
const services = data.services.data;
|
||||
const instances = data.instances.data;
|
||||
const metricTypes = data.metrics.data.types;
|
||||
@ -13,11 +13,11 @@ const resolveFunctions = {
|
||||
portal() {
|
||||
return portal;
|
||||
},
|
||||
deployments() {
|
||||
return deployments;
|
||||
deploymentGroups() {
|
||||
return deploymentGroups;
|
||||
},
|
||||
deployment(_, { uuid }) {
|
||||
return find(deployments, { uuid: uuid });
|
||||
deploymentGroup(_, { uuid }) {
|
||||
return find(deploymentGroups, { uuid: uuid });
|
||||
},
|
||||
services() {
|
||||
return services;
|
||||
@ -35,9 +35,9 @@ const resolveFunctions = {
|
||||
return datacenters;
|
||||
},
|
||||
},
|
||||
Deployment: {
|
||||
services(deployment) {
|
||||
return filter(services, { project: deployment.uuid })
|
||||
DeploymentGroup: {
|
||||
services(deploymentGroup) {
|
||||
return filter(services, { project: deploymentGroup.uuid })
|
||||
}
|
||||
},
|
||||
Service: {
|
||||
|
@ -9,7 +9,7 @@ type Portal {
|
||||
username: String!
|
||||
host: String! # dockerhost
|
||||
datacenter: Datacenter!
|
||||
deployments: [Deployment]!
|
||||
deploymentGroups: [DeploymentGroup]!
|
||||
}
|
||||
|
||||
type Version {
|
||||
@ -17,7 +17,7 @@ type Version {
|
||||
version: String! # version uuid
|
||||
}
|
||||
|
||||
type Deployment {
|
||||
type DeploymentGroup {
|
||||
uuid: String!
|
||||
name: String!
|
||||
datacenter: Datacenter!
|
||||
@ -33,6 +33,7 @@ type DeploymentState {
|
||||
|
||||
type Manifest {
|
||||
uuid: String!
|
||||
deploymentGoup: String!
|
||||
created: Date!
|
||||
type: String!
|
||||
format: String!
|
||||
@ -43,6 +44,7 @@ type Manifest {
|
||||
type Service {
|
||||
uuid: String!
|
||||
hash: String!
|
||||
deploymentGoup: String!
|
||||
version: Version!
|
||||
name: String!
|
||||
instances: [Instance]!
|
||||
@ -73,6 +75,8 @@ type Package {
|
||||
type Instance {
|
||||
uuid: String!
|
||||
name: String!
|
||||
deploymentGoup: String!
|
||||
service: String!
|
||||
metrics: [InstanceMetric]!
|
||||
}
|
||||
|
||||
@ -95,8 +99,8 @@ type Datacenter {
|
||||
|
||||
type Query {
|
||||
portal: Portal
|
||||
deployments: [Deployment]
|
||||
deployment(uuid: String!): Deployment
|
||||
deploymentGroups: [DeploymentGroup]
|
||||
deploymentGroup(uuid: String!): DeploymentGroup
|
||||
services: [Service]
|
||||
service(uuid: String!): Service
|
||||
instances: [Instance]
|
||||
@ -106,10 +110,6 @@ type Query {
|
||||
datacenters: [Datacenter]
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
createDeployment: Deployment
|
||||
}
|
||||
|
||||
`;
|
||||
|
||||
export default makeExecutableSchema({
|
||||
|
Loading…
Reference in New Issue
Block a user