Fixed url

This commit is contained in:
Valentino Kozinec 2022-02-09 10:16:54 +01:00
parent 8e4b371ff7
commit bbce4ed182
3 changed files with 6 additions and 6 deletions

View file

@ -20,7 +20,7 @@ export const Dashboard: React.FC = () => {
<div className="max-w-7xl mx-auto py-4 px-3 sm:px-6 lg:px-8 h-full flex-grow"> <div className="max-w-7xl mx-auto py-4 px-3 sm:px-6 lg:px-8 h-full flex-grow">
<div className="grid grid-cols-1 md:grid-cols-2 md:gap-4 lg:grid-cols-4 mb-10"> <div className="grid grid-cols-1 md:grid-cols-2 md:gap-4 lg:grid-cols-4 mb-10">
{DASHBOARD_APPS(rootDomain!).map((app) => ( {DASHBOARD_APPS(rootDomain!).map((app) => (
<DashboardCard app={app} key={app.name} rootDomain={rootDomain} /> <DashboardCard app={app} key={app.name} />
))} ))}
</div> </div>
@ -32,7 +32,7 @@ export const Dashboard: React.FC = () => {
<dl className="mt-5 grid grid-cols-1 gap-2 sm:grid-cols-2"> <dl className="mt-5 grid grid-cols-1 gap-2 sm:grid-cols-2">
{DASHBOARD_QUICK_ACCESS(rootDomain!).map((item) => ( {DASHBOARD_QUICK_ACCESS(rootDomain!).map((item) => (
<a <a
href={item.to} href={item.url}
key={item.name} key={item.name}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"

View file

@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import { Modal } from 'src/components'; import { Modal } from 'src/components';
import ReactMarkdown from 'react-markdown'; import ReactMarkdown from 'react-markdown';
export const DashboardCard: React.FC<any> = ({ app, rootDomain }: { app: any; rootDomain: string }) => { export const DashboardCard: React.FC<any> = ({ app }: { app: any }) => {
const [readMoreVisible, setReadMoreVisible] = useState(false); const [readMoreVisible, setReadMoreVisible] = useState(false);
const [content, setContent] = useState(''); const [content, setContent] = useState('');
@ -35,7 +35,7 @@ export const DashboardCard: React.FC<any> = ({ app, rootDomain }: { app: any; ro
</div> </div>
<div className="px-2.5 py-2.5 sm:px-4 flex justify-end"> <div className="px-2.5 py-2.5 sm:px-4 flex justify-end">
<a <a
href={`${app.urlShorthand}.${rootDomain}`} href={app.url}
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
className="inline-flex items-center px-2.5 py-1.5 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500" className="inline-flex items-center px-2.5 py-1.5 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500"

View file

@ -35,7 +35,7 @@ export const DASHBOARD_QUICK_ACCESS = (rootDomain: string) => [
{ {
id: 1, id: 1,
name: 'Monitoring →', name: 'Monitoring →',
to: `grafana.${rootDomain}`, url: `grafana.${rootDomain}`,
description: 'Monitor your system with Grafana', description: 'Monitor your system with Grafana',
icon: ChartBarIcon, icon: ChartBarIcon,
active: true, active: true,
@ -43,7 +43,7 @@ export const DASHBOARD_QUICK_ACCESS = (rootDomain: string) => [
{ {
id: 2, id: 2,
name: 'Support →', name: 'Support →',
to: 'https://docs.stackspin.net', url: 'https://docs.stackspin.net',
description: 'Access documentation and forum', description: 'Access documentation and forum',
icon: InformationCircleIcon, icon: InformationCircleIcon,
active: true, active: true,