mirror of https://github.com/rancher/dashboard.git
Merge pull request #1628 from codyrancher/logging-output-providers
Add Providers to the list view of ClusterOutputs
This commit is contained in:
commit
a88bba5924
|
|
@ -667,6 +667,12 @@ logging:
|
||||||
target: Target
|
target: Target
|
||||||
access: Access
|
access: Access
|
||||||
certificate: SSL
|
certificate: SSL
|
||||||
|
outputProviders:
|
||||||
|
elasticsearch: Elasticsearch
|
||||||
|
splunkHec: Splunk
|
||||||
|
kafka: Kafka
|
||||||
|
forward: Fluentd
|
||||||
|
unknown: Unknown
|
||||||
overview:
|
overview:
|
||||||
poweredBy: Banzai Cloud
|
poweredBy: Banzai Cloud
|
||||||
clusterLevel: Cluster-Level
|
clusterLevel: Cluster-Level
|
||||||
|
|
@ -1139,6 +1145,7 @@ tableHeaders:
|
||||||
keys: Data
|
keys: Data
|
||||||
lastUpdated: Last Updated
|
lastUpdated: Last Updated
|
||||||
lastSeen: Last Seen
|
lastSeen: Last Seen
|
||||||
|
loggingOutputProviders: Providers
|
||||||
matches: Matches
|
matches: Matches
|
||||||
message: Message
|
message: Message
|
||||||
name: Name
|
name: Name
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
import { LOGGING } from '@/config/types';
|
import { LOGGING } from '@/config/types';
|
||||||
import { DSL } from '@/store/type-map';
|
import { DSL } from '@/store/type-map';
|
||||||
|
import {
|
||||||
|
LOGGING_OUTPUT_PROVIDERS, STATE, NAME as NAME_COL, NAMESPACE as NAMESPACE_COL, AGE
|
||||||
|
} from '@/config/table-headers';
|
||||||
|
|
||||||
export const NAME = 'logging';
|
export const NAME = 'logging';
|
||||||
export const CHART_NAME = 'rancher-logging';
|
export const CHART_NAME = 'rancher-logging';
|
||||||
|
|
||||||
export function init(store) {
|
export function init(store) {
|
||||||
const {
|
const {
|
||||||
|
headers,
|
||||||
product,
|
product,
|
||||||
basicType,
|
basicType,
|
||||||
virtualType,
|
virtualType,
|
||||||
|
|
@ -36,4 +40,7 @@ export function init(store) {
|
||||||
route: { name: 'c-cluster-logging' },
|
route: { name: 'c-cluster-logging' },
|
||||||
exact: true,
|
exact: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
headers(LOGGING.OUTPUT, [STATE, NAME_COL, NAMESPACE_COL, LOGGING_OUTPUT_PROVIDERS, AGE]);
|
||||||
|
headers(LOGGING.CLUSTER_OUTPUT, [STATE, NAME_COL, NAMESPACE_COL, LOGGING_OUTPUT_PROVIDERS, AGE]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,15 @@ export const NAME = {
|
||||||
canBeVariable: true,
|
canBeVariable: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const LOGGING_OUTPUT_PROVIDERS = {
|
||||||
|
name: 'logging-output-providers',
|
||||||
|
labelKey: 'tableHeaders.loggingOutputProviders',
|
||||||
|
value: 'providersDisplay',
|
||||||
|
sort: ['providersSortable'],
|
||||||
|
width: '75%',
|
||||||
|
formatter: 'List',
|
||||||
|
};
|
||||||
|
|
||||||
export const SIMPLE_NAME = {
|
export const SIMPLE_NAME = {
|
||||||
name: 'name',
|
name: 'name',
|
||||||
labelKey: 'tableHeaders.simpleName',
|
labelKey: 'tableHeaders.simpleName',
|
||||||
|
|
|
||||||
|
|
@ -28,28 +28,28 @@ export default {
|
||||||
const providers = [
|
const providers = [
|
||||||
{
|
{
|
||||||
name: 'elasticsearch',
|
name: 'elasticsearch',
|
||||||
label: 'Elasticsearch',
|
label: this.t('logging.outputProviders.elasticsearch'),
|
||||||
enabled: false,
|
enabled: false,
|
||||||
default: {},
|
default: {},
|
||||||
logo: require(`~/assets/images/logo-color-elasticsearch.svg`)
|
logo: require(`~/assets/images/logo-color-elasticsearch.svg`)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'splunkHec',
|
name: 'splunkHec',
|
||||||
label: 'Splunk',
|
label: this.t('logging.outputProviders.splunkHec'),
|
||||||
enabled: false,
|
enabled: false,
|
||||||
default: {},
|
default: {},
|
||||||
logo: require(`~/assets/images/logo-color-splunk.svg`)
|
logo: require(`~/assets/images/logo-color-splunk.svg`)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'kafka',
|
name: 'kafka',
|
||||||
label: 'Kafka',
|
label: this.t('logging.outputProviders.kafka'),
|
||||||
enabled: false,
|
enabled: false,
|
||||||
default: { format: { type: 'json' } },
|
default: { format: { type: 'json' } },
|
||||||
logo: require(`~/assets/images/logo-color-kafka.svg`)
|
logo: require(`~/assets/images/logo-color-kafka.svg`)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'forward',
|
name: 'forward',
|
||||||
label: 'Fluentd',
|
label: this.t('logging.outputProviders.forward'),
|
||||||
enabled: false,
|
enabled: false,
|
||||||
default: { servers: [{}] },
|
default: { servers: [{}] },
|
||||||
logo: require(`~/assets/images/logo-color-fluentd.svg`)
|
logo: require(`~/assets/images/logo-color-fluentd.svg`)
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,21 @@ export default {
|
||||||
|
|
||||||
return Object.keys(spec)
|
return Object.keys(spec)
|
||||||
.filter(provider => provider !== 'loggingRef');
|
.filter(provider => provider !== 'loggingRef');
|
||||||
}
|
},
|
||||||
|
|
||||||
|
providersDisplay() {
|
||||||
|
return this.providers.map((p) => {
|
||||||
|
const translation = this.t(`logging.outputProviders.${ p }`);
|
||||||
|
|
||||||
|
return translation || this.t('logging.outputProviders.unknown');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
providersSortable() {
|
||||||
|
const copy = [...this.providersDisplay];
|
||||||
|
|
||||||
|
copy.sort();
|
||||||
|
|
||||||
|
return copy.join('');
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue