Merge pull request #1264 from theseyi/bb-rebase

misc fixes for recent features
This commit is contained in:
Seyi Adebajo 2018-07-18 16:41:12 -07:00 committed by GitHub
commit 356ad1b534
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 5 additions and 27 deletions

View File

@ -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;
});
/**

View File

@ -30,9 +30,8 @@ enum DatasetPlatform {
*/
enum Fabric {
Prod = 'PROD',
EI = 'EI',
Corp = 'CORP',
Dev = 'DEV'
EI = 'EI'
}
/**

View File

@ -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 {

View File

@ -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 {

View File

@ -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>

View File

@ -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}}

View File

@ -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,