mirror of https://github.com/rancher/dashboard.git
Merge branch 'master' into namespaces
This commit is contained in:
commit
780647a15d
|
|
@ -30,6 +30,7 @@ trigger:
|
||||||
ref:
|
ref:
|
||||||
- "refs/heads/master"
|
- "refs/heads/master"
|
||||||
- "refs/heads/*-dev"
|
- "refs/heads/*-dev"
|
||||||
|
- "refs/heads/release-*"
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
|
|
@ -122,6 +123,7 @@ depends_on:
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- "refs/heads/*-dev"
|
- "refs/heads/*-dev"
|
||||||
|
- "refs/heads/release-*"
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,9 @@ export default {
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
clicked() {
|
clicked() {
|
||||||
|
if (!this.disabled) {
|
||||||
this.$emit('input', this.value);
|
this.$emit('input', this.value);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -43,6 +45,7 @@ export default {
|
||||||
:tabindex="grouped ? -1 : 0"
|
:tabindex="grouped ? -1 : 0"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
|
:disabled="disabled"
|
||||||
:checked="value"
|
:checked="value"
|
||||||
type="radio"
|
type="radio"
|
||||||
:name="name"
|
:name="name"
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ fi
|
||||||
|
|
||||||
COMMIT=$(git rev-parse --short HEAD)
|
COMMIT=$(git rev-parse --short HEAD)
|
||||||
COMMIT_DATE=$(git --no-pager log -1 --format='%ct')
|
COMMIT_DATE=$(git --no-pager log -1 --format='%ct')
|
||||||
COMMIT_BRANCH=$(git rev-parse --abbrev-ref HEAD | sed -E 's/[^a-zA-Z0-9]+/-/g')
|
COMMIT_BRANCH=$(git rev-parse --abbrev-ref HEAD | sed -E 's/[^a-zA-Z0-9.-]+/-/g')
|
||||||
GIT_TAG=${DRONE_TAG:-$(git tag -l --contains HEAD | head -n 1)}
|
GIT_TAG=${DRONE_TAG:-$(git tag -l --contains HEAD | head -n 1)}
|
||||||
LAST_TAG=${GIT_TAG:-'v0.0.0'}
|
LAST_TAG=${GIT_TAG:-'v0.0.0'}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ import Tabbed from '@/components/Tabbed';
|
||||||
import Footer from '@/components/form/Footer';
|
import Footer from '@/components/form/Footer';
|
||||||
import GatekeeperViolationsTable from '@/components/GatekeeperViolationsTable';
|
import GatekeeperViolationsTable from '@/components/GatekeeperViolationsTable';
|
||||||
import RuleSelector from '@/components/form/RuleSelector';
|
import RuleSelector from '@/components/form/RuleSelector';
|
||||||
|
import RadioGroup from '@/components/form/RadioGroup';
|
||||||
|
import { ucFirst } from '@/utils/string';
|
||||||
|
|
||||||
function findConstraintTypes(schemas) {
|
function findConstraintTypes(schemas) {
|
||||||
return schemas
|
return schemas
|
||||||
|
|
@ -21,6 +23,10 @@ function findConstraintTypes(schemas) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const CONSTRAINT_PREFIX = 'constraints.gatekeeper.sh.';
|
const CONSTRAINT_PREFIX = 'constraints.gatekeeper.sh.';
|
||||||
|
const ENFORCEMENT_ACTION_VALUES = {
|
||||||
|
DENY: 'deny',
|
||||||
|
DRYRUN: 'dryrun'
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -32,6 +38,7 @@ export default {
|
||||||
NameNsDescription,
|
NameNsDescription,
|
||||||
NamespaceList,
|
NamespaceList,
|
||||||
RuleSelector,
|
RuleSelector,
|
||||||
|
RadioGroup,
|
||||||
Tab,
|
Tab,
|
||||||
Tabbed
|
Tabbed
|
||||||
},
|
},
|
||||||
|
|
@ -88,6 +95,8 @@ export default {
|
||||||
localValue,
|
localValue,
|
||||||
templateOptions,
|
templateOptions,
|
||||||
extraDetailColumns,
|
extraDetailColumns,
|
||||||
|
enforcementActionOptions: Object.values(ENFORCEMENT_ACTION_VALUES),
|
||||||
|
enforcementActionLabels: Object.values(ENFORCEMENT_ACTION_VALUES).map(ucFirst)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -116,6 +125,7 @@ export default {
|
||||||
|
|
||||||
value.type = value.type || this.templateOptions[0].value;
|
value.type = value.type || this.templateOptions[0].value;
|
||||||
value.spec = value.spec || {};
|
value.spec = value.spec || {};
|
||||||
|
value.spec.enforcementAction = value.spec.enforcementAction || ENFORCEMENT_ACTION_VALUES.DENY;
|
||||||
value.spec.parameters = value.spec.parameters || {};
|
value.spec.parameters = value.spec.parameters || {};
|
||||||
value.spec.match = value.spec.match || {};
|
value.spec.match = value.spec.match || {};
|
||||||
value.spec.match.kinds = value.spec.match.kinds || [];
|
value.spec.match.kinds = value.spec.match.kinds || [];
|
||||||
|
|
@ -184,6 +194,18 @@ export default {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
<div>
|
||||||
|
<h2>Enforcement Action</h2>
|
||||||
|
<RadioGroup
|
||||||
|
v-model="localValue.spec.enforcementAction"
|
||||||
|
class="enforcement-action"
|
||||||
|
:options="enforcementActionOptions"
|
||||||
|
:labels="enforcementActionLabels"
|
||||||
|
:mode="mode"
|
||||||
|
@input="e=>localValue.spec.enforcementAction = e"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<div class="match">
|
<div class="match">
|
||||||
<h2>Match</h2>
|
<h2>Match</h2>
|
||||||
|
|
@ -228,3 +250,9 @@ export default {
|
||||||
<Footer :mode="mode" :errors="errors" @save="save" @done="done" />
|
<Footer :mode="mode" :errors="errors" @save="save" @done="done" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.enforcement-action {
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue