diff --git a/swagger.yaml b/swagger.yaml index e6b8005c1..ebd5de26e 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -1600,59 +1600,6 @@ paths: required: true type: string format: uuid - /flows/cached/: - get: - operationId: flows_cached_list - description: Info about cached flows - parameters: - - name: ordering - in: query - description: Which field to use when ordering the results. - required: false - type: string - - name: search - in: query - description: A search term. - required: false - type: string - - name: page - in: query - description: A page number within the paginated result set. - required: false - type: integer - - name: page_size - in: query - description: Number of results to return per page. - required: false - type: integer - responses: - '200': - description: '' - schema: - required: - - count - - results - type: object - properties: - count: - type: integer - next: - type: string - format: uri - x-nullable: true - previous: - type: string - format: uri - x-nullable: true - results: - type: array - items: - description: '' - type: object - properties: {} - tags: - - flows - parameters: [] /flows/instances/: get: operationId: flows_instances_list @@ -1740,6 +1687,59 @@ paths: tags: - flows parameters: [] + /flows/instances/cached/: + get: + operationId: flows_instances_cached + description: Info about cached flows + parameters: + - name: flow_uuid + in: query + description: '' + required: false + type: string + - name: name + in: query + description: '' + required: false + type: string + - name: slug + in: query + description: '' + required: false + type: string + - name: designation + in: query + description: '' + required: false + type: string + - name: ordering + in: query + description: Which field to use when ordering the results. + required: false + type: string + - name: search + in: query + description: A search term. + required: false + type: string + - name: page + in: query + description: A page number within the paginated result set. + required: false + type: integer + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: Generic cache stats for an object + schema: + $ref: '#/definitions/Cache' + tags: + - flows + parameters: [] /flows/instances/{slug}/: get: operationId: flows_instances_read @@ -2544,6 +2544,95 @@ paths: tags: - policies parameters: [] + /policies/all/cached/: + get: + operationId: policies_all_cached + description: Info about cached policies + parameters: + - name: bindings__isnull + in: query + description: '' + required: false + type: string + - name: promptstage__isnull + in: query + description: '' + required: false + type: string + - name: ordering + in: query + description: Which field to use when ordering the results. + required: false + type: string + - name: search + in: query + description: A search term. + required: false + type: string + - name: page + in: query + description: A page number within the paginated result set. + required: false + type: integer + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: Generic cache stats for an object + schema: + $ref: '#/definitions/Cache' + tags: + - policies + parameters: [] + /policies/all/types/: + get: + operationId: policies_all_types + description: Get all creatable policy types + parameters: + - name: bindings__isnull + in: query + description: '' + required: false + type: string + - name: promptstage__isnull + in: query + description: '' + required: false + type: string + - name: ordering + in: query + description: Which field to use when ordering the results. + required: false + type: string + - name: search + in: query + description: A search term. + required: false + type: string + - name: page + in: query + description: A page number within the paginated result set. + required: false + type: integer + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: Types of an object that can be created + schema: + description: '' + type: array + items: + $ref: '#/definitions/TypeCreate' + tags: + - policies + parameters: [] /policies/all/{policy_uuid}/: get: operationId: policies_all_read @@ -2715,59 +2804,6 @@ paths: required: true type: string format: uuid - /policies/cached/: - get: - operationId: policies_cached_list - description: Info about cached policies - parameters: - - name: ordering - in: query - description: Which field to use when ordering the results. - required: false - type: string - - name: search - in: query - description: A search term. - required: false - type: string - - name: page - in: query - description: A page number within the paginated result set. - required: false - type: integer - - name: page_size - in: query - description: Number of results to return per page. - required: false - type: integer - responses: - '200': - description: '' - schema: - required: - - count - - results - type: object - properties: - count: - type: integer - next: - type: string - format: uri - x-nullable: true - previous: - type: string - format: uri - x-nullable: true - results: - type: array - items: - description: '' - type: object - properties: {} - tags: - - policies - parameters: [] /policies/dummy/: get: operationId: policies_dummy_list @@ -8486,6 +8522,14 @@ definitions: title: Cache count type: string readOnly: true + Cache: + description: Generic cache stats for an object + type: object + properties: + count: + title: Count + type: integer + readOnly: true FlowDiagram: description: response of the flow's /diagram/ action type: object @@ -8801,6 +8845,33 @@ definitions: title: Object type type: string readOnly: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true + TypeCreate: + description: Types of an object that can be created + type: object + properties: + name: + title: Name + type: string + readOnly: true + minLength: 1 + description: + title: Description + type: string + readOnly: true + minLength: 1 + link: + title: Link + type: string + readOnly: true + minLength: 1 PolicyBinding: description: PolicyBinding Serializer required: @@ -9175,6 +9246,14 @@ definitions: title: Object type type: string readOnly: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true result: title: Result type: boolean @@ -9210,6 +9289,14 @@ definitions: title: Object type type: string readOnly: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true action: title: Action description: Match created events with this action type. When left empty, @@ -9315,6 +9402,14 @@ definitions: title: Object type type: string readOnly: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true expression: title: Expression type: string @@ -9341,6 +9436,14 @@ definitions: title: Object type type: string readOnly: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true group: title: Group type: string @@ -9368,6 +9471,14 @@ definitions: title: Object type type: string readOnly: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true password_field: title: Password field description: Field key to check, field keys defined in Prompt stages are available. @@ -9402,6 +9513,14 @@ definitions: title: Object type type: string readOnly: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true password_field: title: Password field description: Field key to check, field keys defined in Prompt stages are available. @@ -9459,6 +9578,14 @@ definitions: title: Object type type: string readOnly: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true days: title: Days type: integer @@ -9489,6 +9616,14 @@ definitions: title: Object type type: string readOnly: true + verbose_name: + title: Verbose name + type: string + readOnly: true + verbose_name_plural: + title: Verbose name plural + type: string + readOnly: true check_ip: title: Check ip type: boolean @@ -9641,25 +9776,6 @@ definitions: title: Verbose name plural type: string readOnly: true - TypeCreate: - description: Types of an object that can be created - type: object - properties: - name: - title: Name - type: string - readOnly: true - minLength: 1 - description: - title: Description - type: string - readOnly: true - minLength: 1 - link: - title: Link - type: string - readOnly: true - minLength: 1 OAuth2Provider: description: OAuth2Provider Serializer required: diff --git a/web/src/api/Flows.ts b/web/src/api/Flows.ts index 18f604e2b..1b1af9825 100644 --- a/web/src/api/Flows.ts +++ b/web/src/api/Flows.ts @@ -40,8 +40,8 @@ export class Flow { } static cached(): Promise { - return DefaultClient.fetch>(["flows", "cached"]).then(r => { - return r.pagination.count; + return DefaultClient.fetch<{ count: number }>(["flows", "all", "cached"]).then(r => { + return r.count; }); } static adminUrl(rest: string): string { diff --git a/web/src/api/Policies.ts b/web/src/api/Policies.ts index 7e5d78eeb..120c7f839 100644 --- a/web/src/api/Policies.ts +++ b/web/src/api/Policies.ts @@ -20,8 +20,8 @@ export class Policy implements BaseInheritanceModel { } static cached(): Promise { - return DefaultClient.fetch>(["policies", "cached"]).then(r => { - return r.pagination.count; + return DefaultClient.fetch<{ count: number }>(["policies", "all", "cached"]).then(r => { + return r.count; }); } }