Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 45139 grafana x validations UI updates #22

Merged
merged 5 commits into from
May 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions custom.ini
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ min_refresh_interval = 30s
[log.frontend]
enabled = true
custom_endpoint = log

[feature_toggles]
dashgpt = false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes the gpt grafana plugins not load

4 changes: 2 additions & 2 deletions pkg/services/navtree/navtreeimpl/navtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (s *ServiceImpl) GetNavTree(c *contextmodel.ReqContext, prefs *pref.Prefere
orgAdminNode, err := s.getAdminNode(c)

if orgAdminNode != nil {
treeRoot.AddSection(orgAdminNode)
// treeRoot.AddSection(orgAdminNode) LOGZ.IO GRAFANA CHANGE :: hide administration from menu
} else if err != nil {
return nil, err
}
Expand Down Expand Up @@ -485,7 +485,7 @@ func (s *ServiceImpl) buildDataConnectionsNavLink(c *contextmodel.ReqContext) *n

baseUrl := s.cfg.AppSubURL + "/connections"

if hasAccess(datasources.ConfigurationPageAccess) {
if false && hasAccess(datasources.ConfigurationPageAccess) { // LOGZ.IO GRAFANA CHANGE :: hide datasources menu, should be done by altering permissions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if false? haha why?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hide the datasources menu

// Add new connection
children = append(children, &navtree.NavLink{
Id: "connections-add-new-connection",
Expand Down
10 changes: 5 additions & 5 deletions public/app/core/components/AppChrome/TopBar/TopSearchBar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from '@emotion/css';
import { cloneDeep } from 'lodash';
// import { cloneDeep } from 'lodash'; // LOGZ.IO GRAFANA CHANGE :: hide help menu
import React from 'react';
import { useLocation } from 'react-router-dom';

Expand All @@ -10,7 +10,7 @@ import { contextSrv } from 'app/core/core';
import { useSelector } from 'app/types';

import { Branding } from '../../Branding/Branding';
import { enrichHelpItem } from '../MegaMenu/utils';
// import { enrichHelpItem } from '../MegaMenu/utils'; // LOGZ.IO GRAFANA CHANGE :: hide help menu
import { NewsContainer } from '../News/NewsContainer';
import { OrganizationSwitcher } from '../OrganizationSwitcher/OrganizationSwitcher';
import { QuickAdd } from '../QuickAdd/QuickAdd';
Expand All @@ -26,8 +26,8 @@ export const TopSearchBar = React.memo(function TopSearchBar() {
const navIndex = useSelector((state) => state.navIndex);
const location = useLocation();

const helpNode = cloneDeep(navIndex['help']);
const enrichedHelpNode = helpNode ? enrichHelpItem(helpNode) : undefined;
// const helpNode = cloneDeep(navIndex['help']); // LOGZ.IO GRAFANA CHANGE :: hide help menu
const enrichedHelpNode = null; // helpNode ? enrichHelpItem(helpNode) : undefined; // LOGZ.IO GRAFANA CHANGE :: hide help menu
const profileNode = navIndex['profile'];

let homeUrl = config.appSubUrl || '/';
Expand All @@ -50,7 +50,7 @@ export const TopSearchBar = React.memo(function TopSearchBar() {

<TopSearchBarSection align="right">
<QuickAdd />
{enrichedHelpNode && (
{enrichedHelpNode && (
<Dropdown overlay={() => <TopNavBarMenu node={enrichedHelpNode} />} placement="bottom-end">
<ToolbarButton iconOnly icon="question-circle" aria-label="Help" />
</Dropdown>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useStyles2 } from '@grafana/ui';
import { t } from '../../internationalization';

export function BouncingLoader() {
return null; // LOGZ.IO GRAFANA CHANGE :: remove original logo
const styles = useStyles2(getStyles);

return (
Expand Down
2 changes: 2 additions & 0 deletions public/app/core/components/Branding/Branding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface BrandComponentProps {
}

export const LoginLogo: FC<BrandComponentProps & { logo?: string }> = ({ className, logo }) => {
return null; // LOGZ.IO GRAFANA CHANGE :: remove original logo
return <img className={className} src={`${logo ? logo : 'public/img/grafana_icon.svg'}`} alt="Grafana" />;
};

Expand Down Expand Up @@ -43,6 +44,7 @@ const LoginBackground: FC<BrandComponentProps> = ({ className, children }) => {
};

const MenuLogo: FC<BrandComponentProps> = ({ className }) => {
return null; // LOGZ.IO GRAFANA CHANGE :: remove original logo
return <img className={className} src="public/img/grafana_icon.svg" alt="Grafana" />;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export class SharedPreferences extends PureComponent<Props, State> {
</Field>

<Field
hidden // LOGZ.IO GRAFANA CHANGE :: hide language in profile
label={
<Label htmlFor="locale-select">
<span className={styles.labelText}>
Expand Down
45 changes: 24 additions & 21 deletions public/app/features/admin/LicenseChrome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,31 @@ export function LicenseChrome({ header, editionNotice, subheader, children }: Pr

return (
<>
<div className={styles.header}>
<h2 style={title}>{header}</h2>
{subheader && <h3>{subheader}</h3>}
{ false && ( // LOGZ.IO GRAFANA CHANGE :: remove original logo
<div className={styles.header}>
<h2 style={title}>{header}</h2>
{subheader && <h3>{subheader}</h3>}

<Circle
size="128px"
style={{
boxShadow: '0px 0px 24px rgba(24, 58, 110, 0.45)',
background: '#0A1C36',
position: 'absolute',
top: '19px',
left: '71%',
}}
>
<img
src="public/img/grafana_icon.svg"
alt="Grafana"
width="80px"
style={{ position: 'absolute', left: '23px', top: '20px' }}
/>
</Circle>
</div>
)}

<Circle
size="128px"
style={{
boxShadow: '0px 0px 24px rgba(24, 58, 110, 0.45)',
background: '#0A1C36',
position: 'absolute',
top: '19px',
left: '71%',
}}
>
<img
src="public/img/grafana_icon.svg"
alt="Grafana"
width="80px"
style={{ position: 'absolute', left: '23px', top: '20px' }}
/>
</Circle>
</div>

<div className={styles.container}>{children}</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const GrafanaManagedRuleType = ({ selected = false, disabled, onClick }: SharedP
Transform data with expressions.
</span>
}
image="public/img/grafana_icon.svg"
image="" // "public/img/grafana_icon.svg" LOGZ.IO GRAFANA CHANGE :: remove original logo
selected={selected}
disabled={disabled}
value={RuleFormType.grafana}
Expand Down
2 changes: 1 addition & 1 deletion public/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
height: 60px;
background-repeat: no-repeat;
background-size: contain;
background-image: url('[[.LoadingLogo]]');
background-image: none; /* url('[[.LoadingLogo]]'); LOGZ.IO GRAFANA CHANGE :: remove original logo */
}

.preloader__text {
Expand Down
2 changes: 1 addition & 1 deletion public/views/swagger.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}

.topbar-wrapper img {
content: url('public/img/grafana_icon.svg');
content: ""; /* url('public/img/grafana_icon.svg'); LOGZ.IO GRAFANA CHANGE :: remove original logo */
}
</style>
</head>
Expand Down
Loading