Skip to content

Commit

Permalink
Revert "Metrics tracing tags (#1626)" (#1628)
Browse files Browse the repository at this point in the history
This reverts commit 219f9ed.
  • Loading branch information
EddeCCC authored Dec 8, 2023
1 parent 219f9ed commit b204add
Show file tree
Hide file tree
Showing 68 changed files with 422 additions and 2,611 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class ConfigurationView extends React.Component {
* If no version is specified, the latest version will be selected.
*/
openFile = (filename, versionId = null) => {
if (this.props.selectedVersion !== versionId) {
if (this.props.selectedVersion != versionId) {
this.props.selectVersion(versionId, false);
}
this.props.selectFile(filename);
Expand All @@ -191,13 +191,15 @@ class ConfigurationView extends React.Component {
canWrite,
} = this.props;
const showEditor = (selection || selectedDefaultConfigFile) && !isDirectory;

const { path, name } = this.parsePath(selection, selectedDefaultConfigFile);
const icon = 'pi-' + (isDirectory ? 'folder' : 'file');
const showHeader = !!name;

const readOnly = !canWrite || !!selectedDefaultConfigFile || !isLatestVersion;

const fileContentWithoutFirstLine = fileContent ? fileContent.split('\n').slice(1).join('\n') : '';

return (
<div className="this">
<style jsx>{`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ const FileToolbar = ({
tooltipOptions={TOOLTIP_OPTIONS}
onClick={() => showUploadDialog(selection)}
/>
<Button
disabled={readOnly || loading}
tooltip="Upload File or Directory"
icon="pi pi-upload"
tooltipOptions={TOOLTIP_OPTIONS}
onClick={() => showUploadDialog(selection)}
/>
</div>
}
right={
Expand All @@ -120,13 +113,6 @@ const FileToolbar = ({
icon={showHiddenFiles ? 'pi pi-eye' : 'pi pi-eye-slash'}
tooltipOptions={TOOLTIP_OPTIONS}
/>
<Button
disabled={loading}
onClick={toggleShowHiddenFiles}
tooltip={showHiddenFiles ? 'Hide Files' : 'Show Hidden Files'}
icon={showHiddenFiles ? 'pi pi-eye' : 'pi pi-eye-slash'}
tooltipOptions={TOOLTIP_OPTIONS}
/>
<Button
disabled={loading}
onClick={showSearchDialog}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,7 @@ import { ContentTypeMapper } from '../mappings/ContentTypeMapper';
/**
* Dialog that shows the given content, applying syntax highlighting if available, and offering a download option
*/
const DownloadDialogue = ({
visible,
onHide,
error,
loading,
contentValue,
contentType,
contextName,
isDownloadDialogFooterHidden,
onCancel,
}) => {
const DownloadDialogue = ({ visible, onHide, error, loading, contentValue, contentType, contextName }) => {
const dialogueSettings = ContentTypeMapper(contentType, contextName);

const downloadFilename =
Expand All @@ -47,23 +37,18 @@ const DownloadDialogue = ({

return (
<>
<style jsx>{`
.downloadDialogFooter {
display: none;
}
`}</style>
<Dialog
style={{ width: '50vw', overflow: 'auto' }}
header={dialogueSettings.header}
modal={true}
visible={visible}
onHide={onHide}
footer={
<div className={isDownloadDialogFooterHidden ? 'downloadDialogFooter' : null}>
<div>
<a href={error || loading ? null : download()} download={downloadFilename}>
<Button icon="pi pi-download" label="Download" className="p-button-primary" disabled={loading || error} />
</a>
<Button label="Cancel" className="p-button-secondary" onClick={onCancel} />
<Button label="Cancel" className="p-button-secondary" onClick={onHide} />
</div>
}
>
Expand Down Expand Up @@ -101,10 +86,6 @@ DownloadDialogue.propTypes = {
contentType: PropTypes.string,
/** The name of the data's context. E.g. the agent whose logs are being shown.*/
contextName: PropTypes.string,
/** Whether the cancel Button is disabled */
disableDownloadCancelButton: PropTypes.bool,
/** Callback on dialog cancel */
onCancel: PropTypes.func,
};

DownloadDialogue.defaultProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,23 @@ class AgentMappingCell extends React.Component {
display: flex;
align-items: stretch;
}
.mapping-name {
flex: 1;
margin-right: 0.5rem;
}
.no-mapping {
color: gray;
font-style: italic;
}
.show-attributes {
float: right;
cursor: pointer;
color: #007ad9;
}
.attributes {
margin-top: 0.5rem;
border-left: 0.25rem solid #ddd;
Expand Down Expand Up @@ -170,6 +174,7 @@ class StatusTable extends React.Component {
.this {
position: relative;
}
.this :global(.config-info-button) {
width: 1.2rem;
height: 1.2rem;
Expand All @@ -179,6 +184,7 @@ class StatusTable extends React.Component {
background: #ddd;
border-color: #ddd;
}
.this :global(.log-button) {
width: 1.2rem;
height: 1.2rem;
Expand All @@ -188,6 +194,7 @@ class StatusTable extends React.Component {
background: #ddd;
border-color: #ddd;
}
.this :global(.service-state-button) {
width: 1.2rem;
height: 1.2rem;
Expand All @@ -197,6 +204,7 @@ class StatusTable extends React.Component {
background: #ddd;
border-color: #ddd;
}
.this :global(.badge) {
width: 1.2rem;
height: 1.2rem;
Expand All @@ -209,6 +217,7 @@ class StatusTable extends React.Component {
justify-content: center;
color: white;
}
.this :global(.might-overflow) {
max-width: 17.8rem;
display: inline-block;
Expand Down Expand Up @@ -292,11 +301,8 @@ class StatusTable extends React.Component {
};

agentHealthTemplate = (rowData) => {
const { onShowHealthStateDialog } = this.props;
const { healthState, metaInformation } = rowData;
const { health } = healthState;
const { agentId } = metaInformation;
const { onShowDownloadDialog } = this.props;
const { health, metaInformation } = rowData;

let { agentCommandsEnabled, supportArchiveAvailable } = this.resolveServiceAvailability(metaInformation);

Expand All @@ -320,14 +326,12 @@ class StatusTable extends React.Component {
iconColor = '#e8c413';
break;
}

return (
<>
<style jsx>{`
.state {
align-items: center;
display: flex;
cursor: pointer;
position: relative;
}
Expand All @@ -343,10 +347,8 @@ class StatusTable extends React.Component {
`}</style>
{health ? (
<div className="state">
<div className="health-state" onClick={() => onShowHealthStateDialog(agentId, healthState)}>
<i className={classNames('pi pi-fw', iconClass)} style={{ color: iconColor }}></i>
<span>{healthInfo}</span>
</div>
<i className={classNames('pi pi-fw', iconClass)} style={{ color: iconColor }}></i>
<span>{healthInfo}</span>
<Button
className="archive-button"
icon="pi pi-cloud-download"
Expand Down Expand Up @@ -414,12 +416,15 @@ class StatusTable extends React.Component {
display: flex;
align-items: center;
}
.pi {
margin-right: 0.5rem;
}
.pi.live {
color: #ef5350;
}
.pi.workspace {
color: #616161;
}
Expand Down
Loading

0 comments on commit b204add

Please sign in to comment.