mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-28 02:17:53 +00:00
Merge pull request #1264 from theseyi/bb-rebase
misc fixes for recent features
This commit is contained in:
commit
356ad1b534
@ -2,7 +2,7 @@ import Component from '@ember/component';
|
||||
import { computed, get, set, getProperties } from '@ember/object';
|
||||
import { DatasetPlatform, Fabric } from 'wherehows-web/constants';
|
||||
import { action } from '@ember-decorators/object';
|
||||
import { buildLiUrn, datasetUrnRegexLI, getFabricFromUrn } from 'wherehows-web/utils/validators/urn';
|
||||
import { buildLiUrn, datasetUrnRegexLI, getUrnParts } from 'wherehows-web/utils/validators/urn';
|
||||
import { arrayMap } from 'wherehows-web/utils/array';
|
||||
import { task, TaskInstance, timeout } from 'ember-concurrency';
|
||||
import ComputedProperty from '@ember/object/computed';
|
||||
@ -55,7 +55,7 @@ export default class DatasetFabricSwitcher extends Component {
|
||||
* @memberof DatasetFabricSwitcher
|
||||
*/
|
||||
fabric: ComputedProperty<Fabric | void> = computed('urn', function(this: DatasetFabricSwitcher): Fabric | void {
|
||||
return getFabricFromUrn(get(this, 'urn'));
|
||||
return getUrnParts(get(this, 'urn')).fabric;
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@ -30,9 +30,8 @@ enum DatasetPlatform {
|
||||
*/
|
||||
enum Fabric {
|
||||
Prod = 'PROD',
|
||||
EI = 'EI',
|
||||
Corp = 'CORP',
|
||||
Dev = 'DEV'
|
||||
EI = 'EI'
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
.deprecated-dataset {
|
||||
@include pill(set-color(red, maroonflush), set-color(white, base));
|
||||
margin-top: item-spacing(3);
|
||||
line-height: item-spacing(5);
|
||||
|
||||
&--small {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
.removed-dataset {
|
||||
@include pill(set-color(red, maroonflush), set-color(white, base));
|
||||
margin-top: item-spacing(3);
|
||||
line-height: item-spacing(5);
|
||||
|
||||
&--small {
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
(query-params page=1 prefix=crumb.prefix platform=crumb.platform)
|
||||
class="nacho-breadcrumbs__crumb__grain"}}
|
||||
|
||||
<span class="nacho-breadcrumbs__crumb__text">
|
||||
<span class="nacho-breadcrumbs__crumb__text" title="{{crumb.crumb}}">
|
||||
{{split-text crumb.crumb 18}}
|
||||
</span>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<a {{action "click" preventDefault=false}} target={{target}} href={{link}}>
|
||||
<sup>
|
||||
{{#if tooltip}}
|
||||
<i title="{{tooltip}}" class="nacho-tooltip">
|
||||
<i class="nacho-tooltip">
|
||||
More Info
|
||||
</i>
|
||||
{{else}}
|
||||
|
||||
@ -68,24 +68,6 @@ const getPlatformFromUrn = (candidateUrn: string) => {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Extracts the fabric string from a LI (internal) dataset urn
|
||||
* @param {string} urn
|
||||
* @return {Fabric | void}
|
||||
*/
|
||||
const getFabricFromUrn = (urn: string): Fabric | void => {
|
||||
const matches = datasetUrnRegexLI.exec(urn);
|
||||
|
||||
if (matches) {
|
||||
let [, , , fabric] = matches;
|
||||
fabric = fabric.toUpperCase();
|
||||
|
||||
if (isDatasetFabric(fabric)) {
|
||||
return fabric;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Extracts the constituent parts of a datasystem / dataset urn
|
||||
* @param {string} urn
|
||||
@ -226,7 +208,6 @@ export {
|
||||
buildLiUrn,
|
||||
specialFlowUrnRegex,
|
||||
getPlatformFromUrn,
|
||||
getFabricFromUrn,
|
||||
getUrnParts,
|
||||
convertWhUrnToLiUrn,
|
||||
convertWhDatasetPathToLiPath,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user