mirror of https://github.com/rancher/dashboard.git
30 lines
702 B
JavaScript
30 lines
702 B
JavaScript
import SteveModel from '@/plugins/steve/steve-class';
|
|
|
|
export default class PrometheusRule extends SteveModel {
|
|
get customValidationRules() {
|
|
return [
|
|
{
|
|
nullable: false,
|
|
path: 'metadata.name',
|
|
required: true,
|
|
translationKey: 'generic.name',
|
|
type: 'dnsLabel',
|
|
},
|
|
{
|
|
nullable: false,
|
|
path: 'spec',
|
|
required: true,
|
|
type: 'array',
|
|
validators: ['ruleGroups'],
|
|
},
|
|
{
|
|
nullable: false,
|
|
path: 'spec.groups',
|
|
required: true,
|
|
type: 'array',
|
|
validators: ['groupsAreValid'],
|
|
},
|
|
];
|
|
}
|
|
}
|