Update "explore maps" to "atlas"
This commit is contained in:
+3
-3
@@ -190,8 +190,8 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
}
|
||||
|
||||
r.Get("/explore", authorize(ac.EvalPermission(ac.ActionDatasourcesExplore)), hs.Index)
|
||||
r.Get("/explore-maps", authorize(ac.EvalPermission(ac.ActionDatasourcesExplore)), hs.Index)
|
||||
r.Get("/explore-maps/*", authorize(ac.EvalPermission(ac.ActionDatasourcesExplore)), hs.Index)
|
||||
r.Get("/atlas", authorize(ac.EvalPermission(ac.ActionDatasourcesExplore)), hs.Index)
|
||||
r.Get("/atlas/*", authorize(ac.EvalPermission(ac.ActionDatasourcesExplore)), hs.Index)
|
||||
r.Get("/drilldown", authorize(ac.EvalPermission(ac.ActionDatasourcesExplore)), hs.Index)
|
||||
|
||||
r.Get("/playlists/", reqSignedIn, hs.Index)
|
||||
@@ -504,7 +504,7 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
// Playlist
|
||||
hs.registerPlaylistAPI(apiRoute)
|
||||
|
||||
// Explore Maps
|
||||
// Atlas
|
||||
hs.registerExploreMapAPI(apiRoute, hs.exploreMapService)
|
||||
|
||||
// Search
|
||||
|
||||
+20
-20
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func (hs *HTTPServer) registerExploreMapAPI(apiRoute routing.RouteRegister, exploreMapService exploremap.Service) {
|
||||
apiRoute.Group("/explore-maps", func(exploreMapRoute routing.RouteRegister) {
|
||||
apiRoute.Group("/atlas", func(exploreMapRoute routing.RouteRegister) {
|
||||
exploreMapRoute.Get("/", routing.Wrap(hs.listExploreMaps))
|
||||
exploreMapRoute.Post("/", routing.Wrap(hs.createExploreMap))
|
||||
exploreMapRoute.Get("/:uid", routing.Wrap(hs.getExploreMap))
|
||||
@@ -88,9 +88,9 @@ type CreateExploreMapResponse struct {
|
||||
Body *exploremap.ExploreMap `json:"body"`
|
||||
}
|
||||
|
||||
// swagger:route GET /explore-maps explore-maps listExploreMaps
|
||||
// swagger:route GET /atlas explore-maps listExploreMaps
|
||||
//
|
||||
// Get explore maps.
|
||||
// Get atlas maps.
|
||||
//
|
||||
// Responses:
|
||||
// 200: listExploreMapsResponse
|
||||
@@ -107,15 +107,15 @@ func (hs *HTTPServer) listExploreMaps(c *contextmodel.ReqContext) response.Respo
|
||||
|
||||
maps, err := hs.exploreMapService.List(c.Req.Context(), query)
|
||||
if err != nil {
|
||||
return response.Error(http.StatusInternalServerError, "Failed to get explore maps", err)
|
||||
return response.Error(http.StatusInternalServerError, "Failed to get atlas maps", err)
|
||||
}
|
||||
|
||||
return response.JSON(http.StatusOK, maps)
|
||||
}
|
||||
|
||||
// swagger:route GET /explore-maps/{uid} explore-maps getExploreMap
|
||||
// swagger:route GET /atlas/{uid} explore-maps getExploreMap
|
||||
//
|
||||
// Get explore map.
|
||||
// Get atlas map.
|
||||
//
|
||||
// Responses:
|
||||
// 200: getExploreMapResponse
|
||||
@@ -133,17 +133,17 @@ func (hs *HTTPServer) getExploreMap(c *contextmodel.ReqContext) response.Respons
|
||||
m, err := hs.exploreMapService.Get(c.Req.Context(), query)
|
||||
if err != nil {
|
||||
if errors.Is(err, exploremap.ErrExploreMapNotFound) {
|
||||
return response.Error(http.StatusNotFound, "Explore map not found", err)
|
||||
return response.Error(http.StatusNotFound, "Atlas map not found", err)
|
||||
}
|
||||
return response.Error(http.StatusInternalServerError, "Failed to get explore map", err)
|
||||
return response.Error(http.StatusInternalServerError, "Failed to get atlas map", err)
|
||||
}
|
||||
|
||||
return response.JSON(http.StatusOK, m)
|
||||
}
|
||||
|
||||
// swagger:route POST /explore-maps explore-maps createExploreMap
|
||||
// swagger:route POST /atlas explore-maps createExploreMap
|
||||
//
|
||||
// Create explore map.
|
||||
// Create atlas map.
|
||||
//
|
||||
// Responses:
|
||||
// 200: createExploreMapResponse
|
||||
@@ -161,15 +161,15 @@ func (hs *HTTPServer) createExploreMap(c *contextmodel.ReqContext) response.Resp
|
||||
|
||||
m, err := hs.exploreMapService.Create(c.Req.Context(), &cmd)
|
||||
if err != nil {
|
||||
return response.Error(http.StatusInternalServerError, "Failed to create explore map", err)
|
||||
return response.Error(http.StatusInternalServerError, "Failed to create atlas map", err)
|
||||
}
|
||||
|
||||
return response.JSON(http.StatusOK, m)
|
||||
}
|
||||
|
||||
// swagger:route PUT /explore-maps/{uid} explore-maps updateExploreMap
|
||||
// swagger:route PUT /atlas/{uid} explore-maps updateExploreMap
|
||||
//
|
||||
// Update explore map.
|
||||
// Update atlas map.
|
||||
//
|
||||
// Responses:
|
||||
// 200: updateExploreMapResponse
|
||||
@@ -191,17 +191,17 @@ func (hs *HTTPServer) updateExploreMap(c *contextmodel.ReqContext) response.Resp
|
||||
m, err := hs.exploreMapService.Update(c.Req.Context(), &cmd)
|
||||
if err != nil {
|
||||
if errors.Is(err, exploremap.ErrExploreMapNotFound) {
|
||||
return response.Error(http.StatusNotFound, "Explore map not found", err)
|
||||
return response.Error(http.StatusNotFound, "Atlas map not found", err)
|
||||
}
|
||||
return response.Error(http.StatusInternalServerError, "Failed to update explore map", err)
|
||||
return response.Error(http.StatusInternalServerError, "Failed to update atlas map", err)
|
||||
}
|
||||
|
||||
return response.JSON(http.StatusOK, m)
|
||||
}
|
||||
|
||||
// swagger:route DELETE /explore-maps/{uid} explore-maps deleteExploreMap
|
||||
// swagger:route DELETE /atlas/{uid} explore-maps deleteExploreMap
|
||||
//
|
||||
// Delete explore map.
|
||||
// Delete atlas map.
|
||||
//
|
||||
// Responses:
|
||||
// 200: okResponse
|
||||
@@ -219,10 +219,10 @@ func (hs *HTTPServer) deleteExploreMap(c *contextmodel.ReqContext) response.Resp
|
||||
err := hs.exploreMapService.Delete(c.Req.Context(), cmd)
|
||||
if err != nil {
|
||||
if errors.Is(err, exploremap.ErrExploreMapNotFound) {
|
||||
return response.Error(http.StatusNotFound, "Explore map not found", err)
|
||||
return response.Error(http.StatusNotFound, "Atlas map not found", err)
|
||||
}
|
||||
return response.Error(http.StatusInternalServerError, "Failed to delete explore map", err)
|
||||
return response.Error(http.StatusInternalServerError, "Failed to delete atlas map", err)
|
||||
}
|
||||
|
||||
return response.JSON(http.StatusOK, map[string]string{"message": "Explore map deleted"})
|
||||
return response.JSON(http.StatusOK, map[string]string{"message": "Atlas map deleted"})
|
||||
}
|
||||
|
||||
@@ -136,12 +136,12 @@ func (s *ServiceImpl) GetNavTree(c *contextmodel.ReqContext, prefs *pref.Prefere
|
||||
|
||||
if s.cfg.ExploreEnabled && hasAccess(ac.EvalPermission(ac.ActionDatasourcesExplore)) {
|
||||
treeRoot.AddSection(&navtree.NavLink{
|
||||
Text: "Explore Maps",
|
||||
Text: "Atlas",
|
||||
Id: navtree.NavIDExploreMap,
|
||||
SubTitle: "Explore your data on collaborative canvases",
|
||||
Icon: "globe",
|
||||
SortWeight: navtree.WeightExplore + 1,
|
||||
Url: s.cfg.AppSubURL + "/explore-maps",
|
||||
Url: s.cfg.AppSubURL + "/atlas",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ export function getNavTitle(navId: string | undefined) {
|
||||
case 'explore':
|
||||
return t('nav.explore.title', 'Explore');
|
||||
case 'explore-map':
|
||||
return t('nav.explore-map.title', 'Explore Map');
|
||||
return t('nav.explore-map.title', 'Atlas');
|
||||
case 'drilldown':
|
||||
return t('nav.drilldown.title', 'Drilldown');
|
||||
case 'alerting':
|
||||
|
||||
@@ -49,8 +49,8 @@ export default function ExploreMapListPage(props: GrafanaRouteComponentProps) {
|
||||
const result = await exploreMapApi.listExploreMaps(100);
|
||||
setMaps(result);
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to load explore maps');
|
||||
console.error('Failed to load explore maps:', err);
|
||||
setError(err instanceof Error ? err.message : 'Failed to load atlas maps');
|
||||
console.error('Failed to load atlas maps:', err);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -60,14 +60,14 @@ export default function ExploreMapListPage(props: GrafanaRouteComponentProps) {
|
||||
try {
|
||||
setCreatingNew(true);
|
||||
const newMap = await exploreMapApi.createExploreMap({
|
||||
title: 'New Explore Map',
|
||||
title: 'New Atlas',
|
||||
data: initialExploreMapState,
|
||||
});
|
||||
// Navigate to the new map
|
||||
window.location.href = `/explore-maps/${newMap.uid}`;
|
||||
window.location.href = `/atlas/${newMap.uid}`;
|
||||
} catch (err) {
|
||||
console.error('Failed to create explore map:', err);
|
||||
setError(err instanceof Error ? err.message : 'Failed to create explore map');
|
||||
console.error('Failed to create atlas:', err);
|
||||
setError(err instanceof Error ? err.message : 'Failed to create atlas');
|
||||
setCreatingNew(false);
|
||||
}
|
||||
};
|
||||
@@ -78,8 +78,8 @@ export default function ExploreMapListPage(props: GrafanaRouteComponentProps) {
|
||||
setDeleteConfirmUid(null);
|
||||
loadMaps();
|
||||
} catch (err) {
|
||||
console.error('Failed to delete explore map:', err);
|
||||
setError(err instanceof Error ? err.message : 'Failed to delete explore map');
|
||||
console.error('Failed to delete atlas:', err);
|
||||
setError(err instanceof Error ? err.message : 'Failed to delete atlas');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -114,12 +114,12 @@ export default function ExploreMapListPage(props: GrafanaRouteComponentProps) {
|
||||
<ErrorBoundaryAlert>
|
||||
<div className={styles.pageWrapper}>
|
||||
<h1 className="sr-only">
|
||||
<Trans i18nKey="nav.explore-maps.title">Explore Maps</Trans>
|
||||
<Trans i18nKey="nav.explore-maps.title">Atlas</Trans>
|
||||
</h1>
|
||||
|
||||
<div className={styles.header}>
|
||||
<div className={styles.headerContent}>
|
||||
<h2 className={styles.pageTitle}>Explore Maps</h2>
|
||||
<h2 className={styles.pageTitle}>Atlas</h2>
|
||||
<p className={styles.pageDescription}>
|
||||
Create and manage collaborative exploration canvases with multiple panels
|
||||
</p>
|
||||
@@ -149,7 +149,7 @@ export default function ExploreMapListPage(props: GrafanaRouteComponentProps) {
|
||||
</div>
|
||||
|
||||
{loading ? (
|
||||
<LoadingPlaceholder text="Loading explore maps..." />
|
||||
<LoadingPlaceholder text="Loading atlas maps..." />
|
||||
) : filteredMaps.length === 0 ? (
|
||||
<div className={styles.emptyState}>
|
||||
<div className={styles.emptyStateContent}>
|
||||
@@ -160,9 +160,9 @@ export default function ExploreMapListPage(props: GrafanaRouteComponentProps) {
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<p className={styles.emptyStateTitle}>No explore maps yet</p>
|
||||
<p className={styles.emptyStateTitle}>No atlas maps yet</p>
|
||||
<p className={styles.emptyStateText}>
|
||||
Create your first explore map to get started with collaborative exploration
|
||||
Create your first atlas to get started with collaborative exploration
|
||||
</p>
|
||||
<Button icon="plus" onClick={handleCreateNew} disabled={creatingNew}>
|
||||
Create your first map
|
||||
@@ -182,7 +182,7 @@ export default function ExploreMapListPage(props: GrafanaRouteComponentProps) {
|
||||
{deleteConfirmUid && mapToDelete && (
|
||||
<ConfirmModal
|
||||
isOpen={true}
|
||||
title="Delete explore map"
|
||||
title="Delete atlas"
|
||||
body={
|
||||
<>
|
||||
Are you sure you want to delete <strong>{mapToDelete.title}</strong>? This action cannot be
|
||||
@@ -228,7 +228,7 @@ function MapCard({ map, onDelete, formatDate }: MapCardProps) {
|
||||
<Button
|
||||
variant="primary"
|
||||
size="sm"
|
||||
onClick={() => (window.location.href = `/explore-maps/${map.uid}`)}
|
||||
onClick={() => (window.location.href = `/atlas/${map.uid}`)}
|
||||
>
|
||||
Open
|
||||
</Button>
|
||||
|
||||
@@ -28,7 +28,7 @@ providePageContext(/.*/, [
|
||||
AddPanelAction,
|
||||
},
|
||||
namespace: 'exploreMap',
|
||||
prompt: `You have access to an interactive component that helps users add panels to the explore map canvas with pre-configured datasources and queries.
|
||||
prompt: `You have access to an interactive component that helps users add panels to the Atlas canvas with pre-configured datasources and queries.
|
||||
|
||||
Component name: exploreMap_AddPanelAction
|
||||
|
||||
@@ -108,7 +108,7 @@ export default function ExploreMapPage(props: GrafanaRouteComponentProps<{ uid?:
|
||||
return (
|
||||
<div className={styles.loadingWrapper}>
|
||||
<p>
|
||||
<Trans i18nKey="explore-map.page.loading">Loading explore map...</Trans>
|
||||
<Trans i18nKey="explore-map.page.loading">Loading atlas...</Trans>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
@@ -120,7 +120,7 @@ export default function ExploreMapPage(props: GrafanaRouteComponentProps<{ uid?:
|
||||
<div className={styles.pageWrapper}>
|
||||
<DebugAssistantContext />
|
||||
<h1 className="sr-only">
|
||||
<Trans i18nKey="nav.explore-map.title">Explore Map</Trans>
|
||||
<Trans i18nKey="nav.explore-map.title">Atlas</Trans>
|
||||
</h1>
|
||||
<ExploreMapToolbar uid={uid} />
|
||||
<ExploreMapCanvas />
|
||||
|
||||
@@ -44,7 +44,7 @@ export interface ExploreMapCreateResponse {
|
||||
}
|
||||
|
||||
export class ExploreMapApi {
|
||||
private baseUrl = '/api/explore-maps';
|
||||
private baseUrl = '/api/atlas';
|
||||
|
||||
async listExploreMaps(limit?: number): Promise<ExploreMapListItem[]> {
|
||||
const params = limit ? { limit } : {};
|
||||
|
||||
@@ -242,7 +242,7 @@ CRITICAL:
|
||||
const assistantInstructions = useMemo(() => {
|
||||
return createAssistantContextItem('structured', {
|
||||
hidden: true,
|
||||
title: t('explore-map.assistant.capabilities-title', 'Explore Map Capabilities'),
|
||||
title: t('explore-map.assistant.capabilities-title', 'Atlas Capabilities'),
|
||||
data: {
|
||||
capabilities: [
|
||||
t(
|
||||
|
||||
@@ -140,7 +140,7 @@ export function ExploreMapToolbar({ uid }: ExploreMapToolbarProps) {
|
||||
icon="arrow-left"
|
||||
variant="secondary"
|
||||
size="sm"
|
||||
onClick={() => (window.location.href = '/explore-maps')}
|
||||
onClick={() => (window.location.href = '/atlas')}
|
||||
tooltip="Back to maps list"
|
||||
fill="text"
|
||||
/>
|
||||
|
||||
@@ -139,12 +139,12 @@ export function useCanvasPersistence(options: UseMapPersistenceOptions = {}) {
|
||||
console.error('Failed to load map from API:', error);
|
||||
dispatch(
|
||||
notifyApp(
|
||||
createErrorNotification('Failed to load explore map', 'The map may not exist or you may not have access')
|
||||
createErrorNotification('Failed to load atlas', 'The map may not exist or you may not have access')
|
||||
)
|
||||
);
|
||||
// Redirect to list page after a delay
|
||||
setTimeout(() => {
|
||||
window.location.href = '/explore-maps';
|
||||
window.location.href = '/atlas';
|
||||
}, 2000);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
@@ -272,7 +272,7 @@ export function useCanvasPersistence(options: UseMapPersistenceOptions = {}) {
|
||||
// Update last saved state ref to prevent duplicate saves
|
||||
lastSavedCRDTStateRef.current = currentCRDTStateStr;
|
||||
} catch (error) {
|
||||
dispatch(notifyApp(createErrorNotification('Failed to save explore map', 'Changes may not be persisted')));
|
||||
dispatch(notifyApp(createErrorNotification('Failed to save atlas', 'Changes may not be persisted')));
|
||||
} finally {
|
||||
setSaving(false);
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ export function getAppRoutes(): RouteDescriptor[] {
|
||||
),
|
||||
},
|
||||
{
|
||||
path: '/explore-maps',
|
||||
path: '/atlas',
|
||||
pageClass: 'page-explore-maps',
|
||||
roles: () => contextSrv.evaluatePermission([AccessControlAction.DataSourcesExplore]),
|
||||
component: SafeDynamicImport(() =>
|
||||
@@ -181,7 +181,7 @@ export function getAppRoutes(): RouteDescriptor[] {
|
||||
),
|
||||
},
|
||||
{
|
||||
path: '/explore-maps/:uid',
|
||||
path: '/atlas/:uid',
|
||||
pageClass: 'page-explore-map',
|
||||
roles: () => contextSrv.evaluatePermission([AccessControlAction.DataSourcesExplore]),
|
||||
component: SafeDynamicImport(() =>
|
||||
|
||||
Reference in New Issue
Block a user