feat: create image, intstance list, endpoint list

This commit is contained in:
Qiuxia Fan
2022-01-04 15:57:15 +08:00
parent 5ac55b5e09
commit 51932ca877
13 changed files with 259 additions and 10 deletions

View File

@@ -30,3 +30,26 @@ export const Layers = {
layers: listLayers
`,
};
export const Instances = {
variable: "$serviceId: ID!, $duration: Duration!",
query: `
getServiceInstances(duration: $duration, serviceId: $serviceId) {
key: id
label: name
language
attributes {
name
value
}
}
`,
};
export const Endpoints = {
variable: "$serviceId: ID!, $keyword: String!",
query: `
getEndpoints: searchEndpoint(serviceId: $serviceId, keyword: $keyword, limit: 100) {
key: id
label: name
}
`,
};

View File

@@ -14,7 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Services, Layers } from "../fragments/selector";
import { Services, Layers, Endpoints, Instances } from "../fragments/selector";
export const queryServices = `query queryServices(${Services.variable}) {${Services.query}}`;
export const queryLayers = `query ${Layers.query}`;
export const queryEndpoints = `query queryEndpoints(${Endpoints.variable}) {${Endpoints.query}}`;
export const queryInstances = `query queryInstances(${Instances.variable}) {${Instances.query}}`;